gabrielbsales
New Member
- Joined
- Dec 13, 2010
- Messages
- 35
- Reaction score
- 0
PS: In Title is CREATURE '-'
How to do it? i need one function wich get certain storage value.
I try it:
But return this error:
and it
Someone can help me? Thanks
How to do it? i need one function wich get certain storage value.
I try it:
Code:
int32_t LuaScriptInterface::luaGetCreatureSetNick(lua_State* L)
{
//getCreatureSetNick(cid)
ScriptEnviroment* env = getEnv();
std::string strValue;
Creature* creature;
if(creature = env->getCreatureByUID(popNumber(L))){
Monster* monster = (Monster*)creature;
if(monster->getStorage(16767, strValue))
{
lua_pushstring(16767, strValue);
}else
lua_pushnumber(16767, -1);
}
return 1;
}
But return this error:
Code:
cannot convert `std::string' to `const char*' for argument `2' to `void lua_pushstring(lua_State*, const char*)'
Code:
invalid conversion from `int' to `lua_State*'