jhardingame Posted February 12, 2012 Share Posted February 12, 2012 (edited) 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 February 12, 2012 by jhardingame Link to comment Share on other sites More sharing options...
Argomirr Posted February 12, 2012 Share Posted February 12, 2012 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 More sharing options...
jhardingame Posted February 12, 2012 Author Share Posted February 12, 2012 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 More sharing options...
Argomirr Posted February 12, 2012 Share Posted February 12, 2012 No problem! I'm sure we'll all get used to the new syntax eventually. :P Link to comment Share on other sites More sharing options...
Recommended Posts