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 


How to ignore decodeFunction () data error ?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
gfetgkh
Newbie cheater
Reputation: 0

Joined: 06 Apr 2018
Posts: 22

PostPosted: Sat Dec 14, 2019 7:17 pm    Post subject: How to ignore decodeFunction () data error ? Reply with quote

I don't want to pop up the message box when the decodeFunction () data is wrong.
Code:
function myfun()
  local fun=decodeFunction('string')
  if fun then
    fun()
  end
end

pcall(myfun)



data error .png
 Description:
 Filesize:  90.42 KB
 Viewed:  2506 Time(s)

data error .png


Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4715

PostPosted: Sat Dec 14, 2019 11:51 pm    Post subject: Reply with quote

Try pcall.
https://www.lua.org/manual/5.3/manual.html#2.3

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
exohaxor
Expert Cheater
Reputation: 1

Joined: 02 Sep 2018
Posts: 101

PostPosted: Sun Dec 15, 2019 3:09 am    Post subject: Reply with quote

he already has pcall in his code
_________________
hi
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Sun Dec 15, 2019 3:56 am    Post subject: Reply with quote

only proper solution is to have valid data

This is like asking a game not to crash because you're running randomly generated assembler code

if you get it from a website where it sometimes gives a 500 when under load then let the site return the 'decodeFunction(' part of the script as well

_________________
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
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