cannot call function without a variable to call it on ?

Post » Sun Nov 17, 2013 4:55 pm

" cannot call member function Test in global function damagecalc without a variable to call it on"

What does this CK script compile error mean?

User avatar
Sarah Knight
 
Posts: 3416
Joined: Mon Jun 19, 2006 5:02 am

Post » Sun Nov 17, 2013 6:41 pm

It'd help if you posted your script, but I'm assuming your script looks something like this?

Scriptname _test_testscript extends Quest  Function DamageCalc() global    ;stuff    Test()    ;stuffendFunctionFunction Test()    ;stuffendFunction

Global functions do not have the self variable or access to the properties/variables outside of the function, so function Test() must also be global.

Scriptname _test_testscript extends Quest  Function DamageCalc() global    ;stuff    Test()    ;stuffendFunctionFunction Test() global    ;stuffendFunction
User avatar
Reven Lord
 
Posts: 3452
Joined: Mon May 21, 2007 9:56 pm


Return to V - Skyrim