Jump to content

NPC.Get_Level doesn't exist!!!


Recommended Posts

  • Active Member

The most strange thing is happening. The function npc.get_level returns NOTHING!!! It exists in the source, it exists in quest_functions file, but when I call it, I get nothing.

I used it as:

when kill begin
	...
	say(npc.get_level)
	...
end

and in source I tried the default:

int npc_get_level(lua_State* L)
{
        lua_pushnumber(L, CQuestManager::instance().GetCurrentNPCCharacterPtr()->GetLevel());
        return 1;
}

and Ken way:

int npc_get_level(lua_State * L)
{
        LPCHARACTER npc = CQuestManager::instance().GetCurrentNPCCharacterPtr();
        lua_pushnumber(L, npc ? npc->GetLevel() : 0);
        return 0;
}

It just doesn't work!!! What can I do here?

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.