View previous topic :: View next topic |
Author |
Message |
panraven Grandmaster Cheater Reputation: 55
Joined: 01 Oct 2008 Posts: 942
|
Posted: Sat Mar 07, 2020 7:34 am Post subject: |
|
|
dport80 wrote: | Thank you for being patient to help me
Error:[string "function CECheckbox1Change(sender)..."]:2: C stack overflow
i got that when i bound it while im on generated trainer but it work while im on
go back to generated trainer
Code: |
function CECheckbox1Change(sender)
CETrainer.CECheckbox1.Checked = not CETrainer.CECheckbox1.Checked
end
createHotkey(CECheckbox1Change,VK_C)
createHotkey(CECheckbox1Change,VK_O) |
|
The seemily work in trainer might be there is no 'print' popup in trainer, there still errors.
The problem seems checkbox send the change event (checked<->unchecked) triggered inside the event handle function back to itself, form a call loop so c-stack overflow. But I don't understand why this not happened in my Edit example.
Then the Checkbox change event function should not cause the Checkbox change again. For test, we print a message only when the checkbox changed.
Code: |
function CECheckbox1Change(sender)
-- do response on checkbox changed
print('cb state:',tostring( CETrainer.CECheckbox1.Checked))
end
function hkToggle(hko)
CETrainer.CECheckbox1.Checked = not CETrainer.CECheckbox1.Checked
end
createHotkey(hkToggle, VK_C)
|
_________________
- Retarded. |
|
Back to top |
|
|
dport80 Newbie cheater Reputation: 0
Joined: 06 Mar 2020 Posts: 12
|
Posted: Sat Mar 07, 2020 7:56 am Post subject: |
|
|
Its work, thanks a lot how i can disable Lua Engine window without do some shit on the bound system ?
|
|
Back to top |
|
|
panraven Grandmaster Cheater Reputation: 55
Joined: 01 Oct 2008 Posts: 942
|
Posted: Sat Mar 07, 2020 8:45 am Post subject: |
|
|
if you means the print popup, may read this topic ( <- click link )
Code: |
getLuaEngine().cbShowOnPrint.Checked=false
getLuaEngine().hide()
|
_________________
- Retarded. |
|
Back to top |
|
|
dport80 Newbie cheater Reputation: 0
Joined: 06 Mar 2020 Posts: 12
|
Posted: Sat Mar 07, 2020 10:07 am Post subject: |
|
|
Thanks a lot for helped now its work and sorry for lost ur time im a beginner so i sucks
|
|
Back to top |
|
|
|