Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Supressing errors from the lua console

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
SolOfA
How do I cheat?
Reputation: 0

Joined: 01 Jun 2013
Posts: 4

PostPosted: Sat Jun 01, 2013 11:34 am    Post subject: Supressing errors from the lua console Reply with quote

Is there a way to supress/hide the lua engine console? My script creates errors, but it still works. And it's rather annoying.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25791
Location: The netherlands

PostPosted: Sat Jun 01, 2013 11:40 am    Post subject: Reply with quote

add conditions to block those errors from happening

e.g if you set errorOnLookupFailure(false) then you must check yourself that a result is 0 or not

also check for nil objects before using them

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Sat Jun 01, 2013 1:38 pm    Post subject: Reply with quote

Post your script, maybe you did a mistake.
_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
SolOfA
How do I cheat?
Reputation: 0

Joined: 01 Jun 2013
Posts: 4

PostPosted: Sat Jun 01, 2013 4:51 pm    Post subject: Reply with quote

Here's my script, I'm not that familiar with lua, so I probably am missing something.

Whenever the value at the pointer i'm using becomes nil, it vomits out a bunch of
Error:Failure determining what [[[[["DATA.exe"+00FE5F34]+15c]+34]+10]+2d0]+a means

The script still does it's job (Assigning a symbol to the pointer and constantly re-checking it) fine, the errors are pretty annoying though.

Thanks for the help.

Code:
SpellData = '[[[[["DATA.exe"+00FE5F34]+15c]+34]+10]+2d0]+a'
--registerSymbol("SpellBulIndex",getAddress(SpellData),true)


function SpellGetter()
   if readInteger(getAddress(SpellData)) ~= nil then
      unregisterSymbol("SpellBulIndex")
      registerSymbol("SpellBulIndex",getAddress(SpellData),true)
   end
end

if STimer~=nil then
  timer_setEnabled(STimer, false)
  object_destroy(STimer);
  STimer = nil;
end

STimer = createTimer(nil)
timer_onTimer(STimer, SpellGetter)
timer_setInterval(STimer,100)
timer_setEnabled(STimer, true)
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25791
Location: The netherlands

PostPosted: Sat Jun 01, 2013 6:24 pm    Post subject: Reply with quote

add errorOnLookupFailure(false) to your script
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
SolOfA
How do I cheat?
Reputation: 0

Joined: 01 Jun 2013
Posts: 4

PostPosted: Sat Jun 01, 2013 10:28 pm    Post subject: Reply with quote

Worked perfectly, thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites