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 Form]Custom trainer c stack overflow[solved]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Frouk
Expert Cheater
Reputation: 0

Joined: 22 Jun 2021
Posts: 232

PostPosted: Tue Oct 12, 2021 6:22 am    Post subject: [Lua Form]Custom trainer c stack overflow[solved] Reply with quote

I'm making custom trainer for game,when form called too many times, c stack overflow occurs and don't allow to create form again,am i doing something wrong?
I've made:
Code:
local edit = {}
local checkbox = {}
local button = {}
local label = {}
local comboBox = {}

_________________
void(*Haxing)(int Game)


Last edited by Frouk on Tue Oct 12, 2021 9:32 am; edited 1 time in total
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater
Reputation: 4

Joined: 02 Sep 2011
Posts: 516
Location: 0x90

PostPosted: Tue Oct 12, 2021 7:09 am    Post subject: Reply with quote

Check the form isn't created first before creating a new one.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 421

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

PostPosted: Tue Oct 12, 2021 8:26 am    Post subject: Reply with quote

likely an event is triggering another event which in turn triggers the original again

common causes: onshow and onresize

_________________
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
Frouk
Expert Cheater
Reputation: 0

Joined: 22 Jun 2021
Posts: 232

PostPosted: Tue Oct 12, 2021 8:45 am    Post subject: Reply with quote

LeFiXER wrote:
Check the form isn't created first before creating a new one.

Like the method with
Code:
if form then form.destroy() end
?
Form is creating firstly
Dark Byte wrote:
likely an event is triggering another event which in turn triggers the original again

common causes: onshow and onresize

I don't have any with common causes
I can post table where you can see whats wrong

Timer included in script

_________________
void(*Haxing)(int Game)
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 421

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

PostPosted: Tue Oct 12, 2021 9:14 am    Post subject: Reply with quote

instead of
Code:

if form then form.destroy() end

do
Code:

if form then form.destroy() form=nil end

_________________
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
LeFiXER
Grandmaster Cheater
Reputation: 4

Joined: 02 Sep 2011
Posts: 516
Location: 0x90

PostPosted: Tue Oct 12, 2021 9:19 am    Post subject: Reply with quote

What DB said XD.
Back to top
View user's profile Send private message
Frouk
Expert Cheater
Reputation: 0

Joined: 22 Jun 2021
Posts: 232

PostPosted: Tue Oct 12, 2021 9:31 am    Post subject: Reply with quote

thx DB
_________________
void(*Haxing)(int Game)
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