Jump to content

Scripting Functions Don't Exist?


jhardingame

Recommended Posts

So I have a script written up that's supposed to get the players level.

 

The basic script is this;

 

Function Fragment_001()
if player.getlevel(15)
	jarenastartquest.setstage(0)
endif
endfunction

 

However, the compiler gives an error setting saying that "getlevel" is not a function, while the CK Wiki says it is; http://www.creationkit.com/GetLevel_-_Actor

 

Is anyone else getting stuff like this, or am I just doing something wrong?

Edited by jhardingame
Link to comment
Share on other sites

Try it this way:

Function Fragment_001()
       if Game.GetPlayer().getlevel() >= 15
               jarenastartquest.setstage(0)
       endif
endfunction

Compiles just fine for me - I'm guessing you were using the player keyword/variable Oblivion style. In Skyrim, Game.GetPlayer() is the way to get the player ref. Also, GetLevel() does not take any arguments, it only returns the current level so you'll have to use the comparison operators.

Link to comment
Share on other sites

Awesome. Still trying to figure out all the new syntaxing, which is what really seems the big difference between Papyrus and TESScript.

Just tried it and it compiled just fine. Thanks a lot. :D

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...