- Joined
- Mar 16, 2017
- Messages
- 1,418
- Solutions
- 155
- Reaction score
- 1,975
- Location
- London
- GitHub
- MillhioreBT
- Twitch
- millhiorebt
Code:
db.storeQuery
Code:
db->storeQuery
db.storeQuery
db->storeQuery
/home/otx/src/luascript.cpp: In function ‘int luaPlayerGetAutoLootList(lua_State*)’:
/home/otx/src/luascript.cpp:295:22: error: ‘getUserdata’ was not declared in this scope
Player* player = getUserdata<Player>(L, 1);
^
/home/otx/src/luascript.cpp:295:40: error: expected primary-expression before ‘>’ token
Player* player = getUserdata<Player>(L, 1);
^
In file included from /home/otx/src/luascript.cpp:26:0:
/home/otx/src/player.h:1253:22: error: ‘std::set<unsigned int> Player::autoLootList’ is protected
std::set<uint32_t> autoLootList;
^
/home/otx/src/luascript.cpp:298:44: error: within this context
std::set<uint32_t> value = player->autoLootList;
^
/home/otx/src/luascript.cpp: At global scope:
/home/otx/src/luascript.cpp:319:65: error: no ‘int LuaScriptInterface::luaPlayerRemoveAutoLootItem(lua_State*)’ member function declared in class ‘LuaScriptInterface’
int LuaScriptInterface::luaPlayerRemoveAutoLootItem(lua_State* L)
^
/home/otx/src/luascript.cpp:345:62: error: no ‘int LuaScriptInterface::luaPlayerGetAutoLootItem(lua_State*)’ member function declared in class ‘LuaScriptInterface’
int LuaScriptInterface::luaPlayerGetAutoLootItem(lua_State* L)
^
/home/otx/src/luascript.cpp:374:62: error: no ‘int LuaScriptInterface::luaPlayerGetAutoLootList(lua_State*)’ member function declared in class ‘LuaScriptInterface’
int LuaScriptInterface::luaPlayerGetAutoLootList(lua_State* L)
^
/home/otx/src/luascript.cpp: In member function ‘void LuaScriptInterface::registerFunctions()’:
/home/otx/src/luascript.cpp:2243:46: error: ‘luaPlayerAddAutoLootItem’ is not a member of ‘LuaScriptInterface’
registerMethod("Player", "AddAutoLootItem", LuaScriptInterface::luaPlayerAddAutoLootItem);
^
/home/otx/src/luascript.cpp:2244:52: error: ‘luaPlayerRemoveAutoLootItem’ is not a member of ‘LuaScriptInterface’
registerMethod("Player", "RemoveAutoLootItem", LuaScriptInterface::luaPlayerRemoveAutoLootItem);
^
/home/otx/src/luascript.cpp:2245:49: error: ‘luaPlayerGetAutoLootItem’ is not a member of ‘LuaScriptInterface’
registerMethod("Player", "GetAutoLootItem", LuaScriptInterface::luaPlayerGetAutoLootItem);
^
/home/otx/src/luascript.cpp:2246:49: error: ‘luaPlayerGetAutoLootList’ is not a member of ‘LuaScriptInterface’
registerMethod("Player", "GetAutoLootList", LuaScriptInterface::luaPlayerGetAutoLootList);
^
make[2]: *** [CMakeFiles/tfs.dir/src/luascript.cpp.o] Error 1
make[1]: *** [CMakeFiles/tfs.dir/all] Error 2
make: *** [all] Error 2
Scanning dependencies of target tfs
[ 1%] Building CXX object CMakeFiles/tfs.dir/src/luascript.cpp.o
/home/otx/src/luascript.cpp: In function ‘int luaPlayerGetAutoLootList(lua_State*)’:
/home/otx/src/luascript.cpp:295:22: error: ‘getUserdata’ was not declared in this scope
Player* player = getUserdata<Player>(L, 1);
^
/home/otx/src/luascript.cpp:295:40: error: expected primary-expression before ‘>’ token
Player* player = getUserdata<Player>(L, 1);
^
In file included from /home/otx/src/luascript.cpp:26:0:
/home/otx/src/player.h:1253:22: error: ‘std::set<unsigned int> Player::autoLootList’ is protected
std::set<uint32_t> autoLootList;
^
/home/otx/src/luascript.cpp:298:44: error: within this context
std::set<uint32_t> value = player->autoLootList;
^
/home/otx/src/luascript.cpp: At global scope:
/home/otx/src/luascript.cpp:319:65: error: no ‘int LuaScriptInterface::luaPlayerRemoveAutoLootItem(lua_State*)’ member function declared in class ‘LuaScriptInterface’
int LuaScriptInterface::luaPlayerRemoveAutoLootItem(lua_State* L)
^
/home/otx/src/luascript.cpp:345:62: error: no ‘int LuaScriptInterface::luaPlayerGetAutoLootItem(lua_State*)’ member function declared in class ‘LuaScriptInterface’
int LuaScriptInterface::luaPlayerGetAutoLootItem(lua_State* L)
^
/home/otx/src/luascript.cpp:374:62: error: no ‘int LuaScriptInterface::luaPlayerGetAutoLootList(lua_State*)’ member function declared in class ‘LuaScriptInterface’
int LuaScriptInterface::luaPlayerGetAutoLootList(lua_State* L)
^
/home/otx/src/luascript.cpp: In member function ‘void LuaScriptInterface::registerFunctions()’:
/home/otx/src/luascript.cpp:2243:46: error: ‘luaPlayerAddAutoLootItem’ is not a member of ‘LuaScriptInterface’
registerMethod("Player", "AddAutoLootItem", LuaScriptInterface::luaPlayerAddAutoLootItem);
^
/home/otx/src/luascript.cpp:2244:52: error: ‘luaPlayerRemoveAutoLootItem’ is not a member of ‘LuaScriptInterface’
registerMethod("Player", "RemoveAutoLootItem", LuaScriptInterface::luaPlayerRemoveAutoLootItem);
^
/home/otx/src/luascript.cpp:2245:49: error: ‘luaPlayerGetAutoLootItem’ is not a member of ‘LuaScriptInterface’
registerMethod("Player", "GetAutoLootItem", LuaScriptInterface::luaPlayerGetAutoLootItem);
^
/home/otx/src/luascript.cpp:2246:49: error: ‘luaPlayerGetAutoLootList’ is not a member of ‘LuaScriptInterface’
registerMethod("Player", "GetAutoLootList", LuaScriptInterface::luaPlayerGetAutoLootList);
^
make[2]: *** [CMakeFiles/tfs.dir/src/luascript.cpp.o] Error 1
make[1]: *** [CMakeFiles/tfs.dir/all] Error 2
make: *** [all] Error 2
root@instance-1:/home/otx/build# ^C
root@instance-1:/home/otx/build#
[ 45%] Building CXX object CMakeFiles/tfs.dir/src/luascript.cpp.o
/home/rmglasspe/servidor/source/src/luascript.cpp:12743:62: error: no ‘int LuaSc riptInterface::luaPlayerAddAutoLootItem(lua_State*)’ member function declared in class ‘LuaScriptInterface’
int LuaScriptInterface::luaPlayerAddAutoLootItem(lua_State* L)
^
/home/rmglasspe/servidor/source/src/luascript.cpp:12767:65: error: no ‘int LuaSc riptInterface::luaPlayerRemoveAutoLootItem(lua_State*)’ member function declared in class ‘LuaScriptInterface’
int LuaScriptInterface::luaPlayerRemoveAutoLootItem(lua_State* L)
^
/home/rmglasspe/servidor/source/src/luascript.cpp:12793:62: error: no ‘int LuaSc riptInterface::luaPlayerGetAutoLootItem(lua_State*)’ member function declared in class ‘LuaScriptInterface’
int LuaScriptInterface::luaPlayerGetAutoLootItem(lua_State* L)
^
/home/rmglasspe/servidor/source/src/luascript.cpp:12822:62: error: no ‘int LuaSc riptInterface::luaPlayerGetAutoLootList(lua_State*)’ member function declared in class ‘LuaScriptInterface’
int LuaScriptInterface::luaPlayerGetAutoLootList(lua_State* L)
^
make[2]: *** [CMakeFiles/tfs.dir/src/luascript.cpp.o] Error 1
make[1]: *** [CMakeFiles/tfs.dir/all] Error 2
make: *** [all] Error 2
if (autolooted != "" and corpse->getContentDescription() == "nothing") {
if (autolooted != "" || corpse->getContentDescription() == "nothing") {
registerMethod("Player", "addAutoLootItem", LuaScriptInterface::luaPlayerAddAutoLootItem);
registerMethod("Player", "removeAutoLootItem", LuaScriptInterface::luaPlayerRemoveAutoLootItem);
registerMethod("Player", "getAutoLootItem", LuaScriptInterface::luaPlayerGetAutoLootItem);
registerMethod("Player", "getAutoLootList", LuaScriptInterface::luaPlayerGetAutoLootList);
You cannot do this type of spam friend!!! First find all your problems and then comment what you need...
You shouldnt even post here with help or any other person, its resources board. If you have problem with system/code, post it in support and link the thread if its on otland.You said something I already know and explained. I even apologized. However, I helped with information that I made work. And I took the opportunity to ask a question. Anyway, thanks for the alert and sorry again.
Ok thanksYou shouldnt even post here with help or any other person, its resources board. If you have problem with system/code, post it in support and link the thread if its on otland.
I domt agree with you. If theres doubts regarding the system, those should be posted here. Otherwise everything is a mess.You shouldnt even post here with help or any other person, its resources board. If you have problem with system/code, post it in support and link the thread if its on otland.
I bought a much better system.Did you manage to fix this?
Why better? I think this system is quite complete.I bought a much better system.
[QUOTE = "samco, post: 2514935, member: 890"] Por que melhor? Eu acho que esse sistema é bem completo. [/ QUOTE]
https://i.imgur.com/88Ej4t0.png [/ img]
https://i.imgur.com/pMYheEo.png [/ img]
:rolleyes:[/QUOTE]
1 thing, try to fix your post.
2nd thing: this is complete, you can add and remove items from autoloot list.
Yes its great to have modals (i dont think they are that usefull in this case).
Are you going to share that, then?
Then my statement is still valid. This system, as a released one, is quite complete.Are you going to share that, then?..
No,. sry =s
g_game.internalPlayerAddItem(owner, item, true, CONST_SLOT_WHEREEVER);
corpse->internalAddThing(item);
std::ostringstream teste;
teste<< "Teste 1";
owner->sendTextMessage(MESSAGE_LOOT, teste.str());
void MonsterType::createLoot(Container* corpse)
{
if (g_config.getNumber(ConfigManager::RATE_LOOT) == 0) {
corpse->startDecaying();
return;
}
Player* owner = g_game.getPlayerByID(corpse->getCorpseOwner());
if (!owner || owner->getStaminaMinutes() > 840) {
int goldCoins = 0;
int platinumCoins = 0;
std::ostringstream ss;
ss << "Loot of " << nameDescription << ": ";
for (auto it = info.lootItems.rbegin(), end = info.lootItems.rend(); it != end; ++it) {
auto itemList = createLootItem(*it);
if (itemList.empty()) {
continue;
}
for (Item* item : itemList) {
//auto loot gold coin and platinum coin
if (item->getID() == 2148 || item->getID() == 2152) {
if (item->getID() == 2148) {
goldCoins = item->getItemCount();
}
if (item->getID() == 2152) {
platinumCoins = item->getItemCount();
}
g_game.internalPlayerAddItem(owner, item, true, CONST_SLOT_WHEREEVER);
}
//check containers
if (Container* container = item->getContainer()) {
if (!createLootContainer(container, *it)) {
delete container;
continue;
}
}
//changed for auto loot
if (item->getID() != 2148 && item->getID() != 2152) {
if (g_game.internalAddItem(corpse, item) != RETURNVALUE_NOERROR) {
corpse->internalAddThing(item);
}
}
}
}
if (owner) {
if (goldCoins > 0) {
if (goldCoins == 1) {
ss << goldCoins << " gold coin, ";
}
else if (goldCoins > 1) {
ss << goldCoins << " gold coins, ";
}
}
if (platinumCoins > 0) {
if (platinumCoins == 1) {
ss << platinumCoins << " platinum coin, ";
}
else if (platinumCoins > 1) {
ss << platinumCoins << " platinum coins, ";
}
}
ss << corpse->getContentDescription();
if (owner->getParty()) {
owner->getParty()->broadcastPartyLoot(ss.str());
} else {
owner->sendTextMessage(MESSAGE_LOOT, ss.str());
}
}
} else {
std::ostringstream ss;
ss << "nothing (due to low stamina)";
if (owner->getParty()) {
owner->getParty()->broadcastPartyLoot(ss.str());
} else {
owner->sendTextMessage(MESSAGE_LOOT, ss.str());
}
}
corpse->startDecaying();
}