Jump to content

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
https://metin2.dev/topic/20307-npcget_level-doesnt-exist/
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

  • Active Member
say(npc.get_level)

 

 

say(npc.get_level())

Wtf-Lol-meme.png

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
  • Love 2
Link to comment
https://metin2.dev/topic/20307-npcget_level-doesnt-exist/#findComment-110218
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

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.