|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
paul44 Expert Cheater Reputation: 2
Joined: 20 Jul 2017 Posts: 152
|
Posted: Tue Nov 14, 2017 11:03 am Post subject: Lua - Info/Error Popup Window |
|
|
It happened quite a few times now, but whenever I get an error causing that popup window to loop/print a particular error (either caused by a typo, unfinished function, etc), it becomes impossible to continue.
The error keeps displaying and either I need to kill CE (sometimes not even possible), log off (best case) or restart/reboot...
It would be nice if that particular window had an option to "halt" any reporting (button, tickbox, etc), so one can gracefully save/quit CE. Or actually correct the problem, then continue...
Anyways: did some searching, but could not find anything related to this (except more mentioning of the same situation). If there is a graceful workaround, surely let me/us know.
ps: happened to me 3x last weekend; obviously losing my progress on each occassion (bummer)...
some examples:
- added {luacall(LocationTimer("Welcome"))} (without {}) but mistyped 'Welcome'
- added {addrXY = getAddress("XYstepVal")}: same thing; typo
- plenty more
PS2:up to last week, I got constant Cloudflare warnings; and could not post a single thing. Seem to be solved now?! (... Ray ID: 3b97dbeea59a442d) |
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4297
|
Posted: Tue Nov 14, 2017 12:20 pm Post subject: |
|
|
paul44 wrote: | It would be nice if that particular window had an option to "halt" any reporting (button, tickbox, etc), so one can gracefully save/quit CE. |
Do you mean you don't want the window to move to the foreground on print? If so, disable the menu item View -> Show on "print" in the Lua Engine window.
If you don't want it repeatedly showing errors, then try testing your code. If it doesn't work, don't place it in a timer where it'll give you the same error every time the timer calls Lua code to run.
You could also hook createTimer to do something like this:
Code: | createTimer_old = createTimer_old or createTimer
timer_hook_mt = {
__index = function(self, k)
return self.rawtimer[k]
end,
__newindex = function(self, k, v)
if string.lower(k) == 'ontimer' then
self.rawtimer.OnTimer = function(...)
local success, msg = pcall(v, ...)
if not success then
self.rawtimer.Enabled = false
error(msg)
end
end
else
self.rawtimer[k] = v
end
end,
}
createTimer = function(...)
return setmetatable({ rawtimer = createTimer_old(...) }, timer_hook_mt)
end
|
This way, when there's an error, the timer is disabled. Note that this is not a solution for a problem: it is a way for you to diagnose what the problem is. _________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
paul44 Expert Cheater Reputation: 2
Joined: 20 Jul 2017 Posts: 152
|
Posted: Tue Nov 14, 2017 1:30 pm Post subject: Error looping |
|
|
I do want it to print (for me a common practice to figure out if I'm working with/getting the right values), when appropriate. Ie when I am using print statements. The situation I have - and I have come across others mentioning this when searching for a solution - is when one simply misses, or mistypes, or forget to update, etc.
In one particular case: I was creating a new entry, based on an existing/working entry in the addreslist. Unfortunately, I got a mistype... and off it goes... In another case, I changed the entryname in the addresslist, but - almost obviously - forgot to update the lua script...
And indeed, I'm using a 'timer' function here.
Bottomline: usually a 'pain in the butt', and 7/10 I can kill CE without the need to reset my cpu. but I would definitely appreciate some/any way to pause that window when it starts 'print-looping' errors...
_______
Example: [ imgur_com/a/Zejdl ] (I just slightly changed the entry_name in a 'getAddressList()' to something else ~ clicking very fast on the CE title [x] can get me quit CE sometimes)
-EDIT-
I have not forgotten this; just did not yet encounter an "extreme" case. But to be honest, it does seem to do exactly what you stated... and what I wanted.
Last edited by paul44 on Tue Nov 28, 2017 12:52 pm; edited 1 time in total |
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4297
|
Posted: Tue Nov 14, 2017 1:49 pm Post subject: |
|
|
Cheat Engine can't protect you from yourself, and neither can anyone else if you don't take other people's suggestions.
As I have already said, disable the menu item View -> Show on "print" in the Lua Engine window if you want to stop bringing the Lua engine window to the foreground. _________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
|
|
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
|
|