Page 1 of 1

Superloading problems

Posted: Sat Sep 19, 2015 12:54 am
by Charidan
I have tried to superload the Player.lua file, and now I am receiving an error that Player.runCheck() is nil. I didn't touch runCheck() specifically, so by my understanding it should still exist in the base version of Player.

I *am* calling the function PlayerRest.initRest() which indirectly calls Player.restCheck().

How can I get ToME to use the original restCheck while using my superload of Player?

Re: Superloading problems

Posted: Sat Sep 19, 2015 12:58 am
by Charidan
Nevermind! It turns out that PlayerRest calls a function which returns the string error "player:restCheck() method not defined" without actually checking anything at all. The solution is just to overload that method with a call to player.restCheck().