LoLaye
Active Member
Your doing it wrong then, you were supposed to replace the part with the updated one!
I did, but it still gives me errors.. it tells me something with #include const.h
or something like that
Your doing it wrong then, you were supposed to replace the part with the updated one!
It's pretty hard to follow, you have to look at it carefully.
+666th Post :>
int32_t LuaScriptInterface::luaGetItemParent(lua_State* L)
{
//getItemParent(uid)
ScriptEnviroment* env = getEnv();
Item* item = env->getItemByUID(popNumber(L));
if(!item)
{
errorEx(getError(LUA_ERROR_ITEM_NOT_FOUND));
lua_pushnil(L);
return 1;
}
Item* container = item->getParent()->getItem();
pushThing(L, container, env->addThing(container));
return 1;
}
//getItemParent(uid)
[COLOR="red"] lua_register(m_luaState, "getItemParent", LuaScriptInterface::luaGetItemParent);[/COLOR]
Why don't you donate and get 0.4?
I dont know why but its giving these now
145 C:\Users\Mojtaba\Downloads\forgottenserver-0.3.6pl1.r83\0.3.6pl1.r83\luascript.cpp expected ')' before '(' token
145 C:\Users\Mojtaba\Downloads\forgottenserver-0.3.6pl1.r83\0.3.6pl1.r83\luascript.cpp *** [obj//luascript.o] Error 1
Heres the code
Code:int32_t LuaScriptInterface::luaGetItemParent(lua_State* L) { //getItemParent(uid) ScriptEnviroment* env = getEnv(); Item* item = env->getItemByUID(popNumber(L)); if(!item) { errorEx(getError(LUA_ERROR_ITEM_NOT_FOUND)); lua_pushnil(L); return 1; } Item* container = item->getParent()->getItem(); pushThing(L, container, env->addThing(container)); return 1; } //getItemParent(uid) [COLOR="red"] lua_register(m_luaState, "getItemParent", LuaScriptInterface::luaGetItemParent);[/COLOR]
I've tried to put a ( but not working
P.S the red marked text is where im getting errors
Because you didn't fix your groups.xml. Post it.:s and i cant loggin to my GM char, it gives me a debug..
<?xml version="1.0" encoding="UTF-8"?>
<groups>
<group id="1" name="Player"/>
<group id="2" name="Tutor" flags="16809984" customFlags="2" access="1" violationReasons="4" nameViolationFlags="2"/>
<group id="3" name="Senior Tutor" flags="68736352256" customFlags="14" access="2" violationReasons="10" nameViolationFlags="2" statementViolationFlags="63" maxVips="200"/>
<group id="4" name="Gamemaster" flags="3808558964575" customFlags="257215" access="3" violationReasons="19" nameViolationFlags="10" statementViolationFlags="69" depotLimit="3000" maxVips="300" outfit="75"/>
<group id="5" name="Community Manager" flags="3840774348794" customFlags="781823" access="4" violationReasons="23" nameViolationFlags="170" statementViolationFlags="213" depotLimit="4000" maxVips="400" outfit="266"/>
<group id="6" name="God" flags="3845069447162" customFlags="2097151" access="5" violationReasons="23" nameViolationFlags="170" statementViolationFlags="213" depotLimit="5000" maxVips="500" outfit="302"/>
</groups>
<?xml version="1.0" encoding="UTF-8"?>
<groups>
<group id="1" name="Player"/>
<group id="2" name="Tutor" flags="16809984" customFlags="2" access="1"/>
<group id="3" name="Senior Tutor" flags="68736352256" customFlags="14" access="2" maxVips="200"/>
<group id="4" name="Gamemaster" flags="3808558964575" customFlags="257215" access="3" depotLimit="3000" maxVips="300" outfit="75"/>
<group id="5" name="Community Manager" flags="3840774348794" customFlags="781823" access="4" depotLimit="4000" maxVips="400" outfit="266"/>
<group id="6" name="God" flags="3845069447162" customFlags="2097151" access="5" depotLimit="5000" maxVips="500" outfit="302"/>
</groups>