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 


What is "limit 200"?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
ByTransient
Expert Cheater
Reputation: 5

Joined: 05 Sep 2020
Posts: 240

PostPosted: Fri May 28, 2021 11:23 am    Post subject: What is "limit 200"? Reply with quote

I am trying to make a great Trainer and although it is halfway it is in 2500 lines for now.

I do not use the form designer, instead I create 70 panels, Edit, Label.
I create them all in the "local" header to be able to use them again.

But it warns that the CE limit for the "local" heading (track) is 200.
Also "=" repeats this sign in the same error.

Note: When I remove the "local" phrase from the beginning of the created objects (GroupBox, Panel, Label, Edit), it continues to give errors for no reason and the Trainer (when clicking Execute Script) does not open.

Where am I doing wrong?
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Fri May 28, 2021 11:33 am    Post subject: Reply with quote

lua only allows 200 local variables in any given code. If you're getting errors with globals then it's probably variables using the same names but not holding what is expected, hard to say without any info on the errors. Try breaking things up into smaller chunks using functions, objects, and modules.
_________________
Back to top
View user's profile Send private message Visit poster's website
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Fri May 28, 2021 12:39 pm    Post subject: This post has 1 review(s) Reply with quote

tip: use a local table and fill that with all the data
_________________
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
ByTransient
Expert Cheater
Reputation: 5

Joined: 05 Sep 2020
Posts: 240

PostPosted: Sat May 29, 2021 8:06 am    Post subject: Reply with quote

I made a test table (1 Edit, 1 Button, 2 Memo, 1 Label)
I put the error free script (2500 lines) in memo1, (if the last 400 lines with errors are added (2500+400)) I wrote "local" in Edit and pressed the button to scan.
Result; There are 248 "local" phrases (all lines starting with "local" came to memo2) and only 11 seem to have used the same word. "local codeIndex1", I changed = "codeIndex1".
I fixed them. Note: It was excerpted from the code that worked fine in the previous Trainer. "local codeIndex1"
Now I will test and add 2500+.
I hope there will be no problems.

EDIT :
DarkByte, you want to say;

Code:
myTrainer={}

myTrainer.form = createForm()
myTrainer.form.Popupmode = 0;
myTrainer.form.Position = poDesktopCenter

myTrainer.Btn1=createButton(myTrainer.form)
myTrainer.Btn1.left=25
myTrainer.Btn1.top=25
myTrainer.Btn1.caption="Click me"


Is this what you want to say?
Since I'm constantly testing, I need to kill it, how can I do that?
"myTrainer.Destroy()" throws an error or "myTrainer=nil" is not working.
I don't want to re-create "Timers" especially created.
Is there a way to kill it under construction?

EDIT 2:

Code:
if myTrainer.form then myTrainer.form.Destroy() end
myTrainer={}

myTrainer.form = createForm()
myTrainer.form.Popupmode = 0;
myTrainer.form.Position = poDesktopCenter

myTrainer.Btn1=createButton(myTrainer.form)
myTrainer.Btn1.left=25
myTrainer.Btn1.top=25
myTrainer.Btn1.caption="Click me"


This worked.
I hope the "myTrainer={}" table works.
2500 lines will be difficult to adapt to this.
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 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