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 


Lua Script "Unknown Error" Fix!

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials -> LUA Tutorials
View previous topic :: View next topic  
Author Message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Mon Apr 03, 2023 4:58 pm    Post subject: Lua Script "Unknown Error" Fix! Reply with quote

-- Where is the mistake? In what line or syntax?

CE Lua Scripte I came across something recently.
It was difficult to tell whether this was a mistake or not.
Because Script Load was detecting an error and was not telling what it was.

So like this;
It shows no problem in CT code.
Cetrainer shows no problem in code.
The script works fine in both formats.
But on a different PC it was giving the error in the picture below and not telling where the error was.

Here is the solution and general test procedure;

Paste the following code at the beginning of your existing script code;
Code:
local status, err = pcall(function()


And paste the following code at the bottom and run the script.;
Code:
end)

print(err)


There's no guarantee he'll see everything.
But in my case it saved a 4000 line script from having to go through again.

If you have similar solutions, feel free to comment.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials -> LUA Tutorials 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 cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites