View previous topic :: View next topic |
Author |
Message |
Reclaimer Shawn Advanced Cheater Reputation: 0
Joined: 09 Jun 2015 Posts: 77
|
Posted: Tue Mar 13, 2018 6:08 pm Post subject: How do you suppress errors given by Lua Engine Window? |
|
|
So, one of the trainers I made constantly writes values to certain memory addresses. After the game closes out, the trainer spits out a long list of errors because its writing to memory addresses that no longer exist for the game. I think it looks unprofessional. Is there anyway to suppress the Lua Engine window in a Cheat Trainer .exe? I'm working with Cheat Engine 6.5.1 by the way (mainly because I'm used to the current syntax and don't want to relearn bits of it for 6.7)
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Tue Mar 13, 2018 6:36 pm Post subject: |
|
|
If that exe trainer made by you then I believe you kept source code for that exe trainer, then just edit source code which are contain error.
Or just reverse that exe trainer to CT file and edit it.
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Tue Mar 13, 2018 6:40 pm Post subject: |
|
|
Or Lua Engine form -> "View" -> uncheck "Show on Print".
_________________
|
|
Back to top |
|
|
Reclaimer Shawn Advanced Cheater Reputation: 0
Joined: 09 Jun 2015 Posts: 77
|
Posted: Wed Mar 14, 2018 8:35 pm Post subject: |
|
|
TheyCallMeTim13 wrote: | Or Lua Engine form -> "View" -> uncheck "Show on Print". |
That works just nicely. Is there any script/way to do this via the source code of my tool so a person who uses my tool never runs into this problem?
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Wed Mar 14, 2018 9:26 pm Post subject: |
|
|
There may be a setting that I don't know about, but I don't know of any easy why (mostly I'm thinking get the forms menu and check/activate that menu item).
But I like to add a logger to my stuff, this way you just set "DEBUG = true" or the logger level to what ever you need.
Code: | --------
-------- Logger
--------
local Logger = { ClassName = 'I2Logger', Name = 'I2CET_Logger' }
Logger.LEVELS = { OFF = 0, ERROR = 1, WARN = 2, INFO = 3, DEBUG = 4 }
Logger.Level = Logger.LEVELS.WARN
if DEBUG then Logger.Level = Logger.LEVELS.DEBUG end
Logger.print = print
function Logger.logEvent(level, msg, ex)
if Logger.Level >= level then
Logger.print(msg)
if ex then Logger.print('Exception: ' .. tostring(ex)) end
end
end
for k,v in pairs(Logger.LEVELS) do
if v > 0 then
Logger[k:lower()] = function(msg, ex) return Logger.logEvent(v, msg, ex) end
Logger[k:lower() .. 'f'] = function(msg, ... ) return Logger.logEvent(v, string.format(msg, ... )) end
end
end |
This is a template from my Lua templates extension.
Then just write to it like this:
Code: | Logger.error('This is a error message') |
Code: | Logger.warn('This is a warning message') |
Code: | Logger.info('This is an information message') |
Code: | Logger.debug('This is a debug message') |
And all of them have a format method ("*f"):
Code: | Logger.debugf('writeToCoords: writing: ' .. pointerFtmStr .. ' : %f9', base + I2CETeleporter.Xoffset, x) |
_________________
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Wed Mar 14, 2018 10:07 pm Post subject: |
|
|
or (place this code at beginning of script)
Code: | getLuaEngine().cbShowOnPrint.Checked=false
getLuaEngine().hide()
--Alternative
getLuaEngine().OnShow = function (sender) return sender.hide(); end |
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Wed Mar 14, 2018 11:13 pm Post subject: |
|
|
Corroder wrote: | or (place this code at beginning of script)
Code: | getLuaEngine().cbShowOnPrint.Checked=false
getLuaEngine().hide()
--Alternative
getLuaEngine().OnShow = function (sender) return sender.hide(); end |
|
I was thinking there was an easy way, just couldn't find it quickly and I didn't want to speak on some thing I don't use/know. Thanks Corroder, it's best to have all the relevant info.
_________________
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Thu Mar 15, 2018 3:47 am Post subject: |
|
|
Your welcome ..@Tim.
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
Reclaimer Shawn Advanced Cheater Reputation: 0
Joined: 09 Jun 2015 Posts: 77
|
Posted: Thu Mar 15, 2018 5:26 pm Post subject: |
|
|
Corroder wrote: | or (place this code at beginning of script)
Code: | getLuaEngine().cbShowOnPrint.Checked=false
getLuaEngine().hide()
--Alternative
getLuaEngine().OnShow = function (sender) return sender.hide(); end |
|
This works perfectly! I need no further assistance from here. Thanks!
|
|
Back to top |
|
|
|