Exemple #1
0
static int PlayerCharacterL_Remove(lua_State* luaVM)
{
   PlayerCharacter* playerCharacter = luaW_check<PlayerCharacter>(luaVM, 1);
   if (playerCharacter == nullptr)
   {
      return lua_error(luaVM);
   }

   playerCharacter->removeFromMap();

   return 0;
}
static int PlayerCharacterL_Remove(lua_State* luaVM)
{
   int nargs = lua_gettop(luaVM);
   
   switch(nargs)
   {
      case 1:
      {
         PlayerCharacter* playerCharacter = luaW_check<PlayerCharacter>(luaVM, 1);
         if (playerCharacter)
         {
            playerCharacter->removeFromMap();
         }
         break;
      }
   }
   return 0;
}