darkmu
Well-Known Member
How can I insert debug codes into the source to check what value is being passed?
could i see through the tfs console?
Example:
could i see through the tfs console?
Example:
C++:
int LuaScriptInterface::luaPlayerGetPreyUnlocked(lua_State* L)
{
Player* player = getUserdata<Player>(L, 1);
uint16_t slot = getNumber<uint8_t>(L, 2);
if (player) {
debugPrint(slot); // Example debug
lua_pushnumber(L, player->getPreyUnlocked(slot));
}
else {
lua_pushnil(L);
}
return 1;
}