//lua functions
static int32_t luaSelectRandomPlayer(lua_State* L);
void LuaScriptInterface::registerFunctions()
{
//selectRandomPlayer(uid[, count])
lua_register(m_luaState, "selectRandomPlayer", LuaScriptInterface::luaSelectRandomPlayer);
int32_t LuaScriptInterface::luaGetPlayerAccountManager(lua_State* L)
{
return internalGetPlayerInfo(L, PlayerInfoAccountManager);
}
int32_t LuaScriptInterface::luaSelectRandomPlayer(lua_State* L)
{
//selectRandomPlayer()
lua_pushinteger(L, autoList.begin() + rand() % (autoList.end()+1 - autoList.begin()) );
return 1;
}
In static member function `static int32_t LuaScriptInterface::luaSelectRandomPlayer(lua_State*)':
2788 .:\M...\forgottenserver-0.3.6pl1\0.3.6pl1\luascript.cpp `autoList' was not declared in this scope
.:\...\forgottenserver-0.3.6pl1\0.3.6pl1\dev-cpp\Makefile.win [Build Error] [obj//luascript.o] Error 1