ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Wed Mar 29, 2017 1:20 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Superloading problems
PostPosted: Sat Sep 19, 2015 12:54 am 
Offline
Higher

Joined: Wed Jul 22, 2015 8:12 pm
Posts: 56
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?

_________________
Currently developing the Player AI addon. You can get it from the T-Engine Addon Hub or Steam
You can also view the source code.


Top
 Profile  
 
PostPosted: Sat Sep 19, 2015 12:58 am 
Offline
Higher

Joined: Wed Jul 22, 2015 8:12 pm
Posts: 56
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().

_________________
Currently developing the Player AI addon. You can get it from the T-Engine Addon Hub or Steam
You can also view the source code.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group