View previous topic :: View next topic |
Author |
Message |
STN I post too much
Reputation: 43
Joined: 09 Nov 2005 Posts: 2676
|
Posted: Sat Jul 05, 2014 4:59 am Post subject: bug when saving lua script |
|
|
Not sure if this is intentional with the new ce 6.4 or a bug. When you go to Show Cheat Table Lua Script and try to Save As, nothing happens.
I make my trainers using that method (save as .exe) and it just doesn't seem to be doing anything anymore with the new CE. The generate function works fine however but it erases my lua code which isn't what i want.
Using the 64bit version of Cheat engine and using my old code for an old trainer that i am trying to update. Not sure if this happens with a new version of CE (lua script saved with new ce then reopening).
Using windows 8 64 bit
EDIT: Tried with CE 6.3 and it saves just fine. Same script
EDIT2: Wow, this is really weird. With completely new script (CE 6.4), the Save As function doesn't work at all, the Save function works and pops up new window, i saved as .ct. Closed CE, reopened the ct file and tried to Save As and Save, this time none of the two functions work at all.
Anybody else notice this or its just me ?
_________________
|
|
Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sat Jul 05, 2014 5:42 am Post subject: |
|
|
STN wrote: | The generate function works fine however but it erases my lua code which isn't what i want. |
If you read this:
--TRAINERGENERATORSTART--
--This is autogenerated code. Changing code in this block will
--get erased and rewritten if you regenerate the trainer code
You can deduce that removing this "--TRAINERGENERATORSTART--" and "--TRAINERGENERATORSTOP--" will prevent this.
I personally place my code outside this block, and common parts (autogenerated, not customized) inside block.
Indeed. "Save as" doesn't work in this window. Bug?
"save" entry still work, and CTRL+S shortcut too- for new script it will ask for file name. Next time it will save without asking for file name. You can see that it still work by looking on the left side, edited part has yellow line, when you hit CTRL+S it will change to green (which means that CE saved changes).
When you open CT file, edit Lua script and hit CTRL+S, it will not ask for filename too (CE already knows file name)
Meanwhile, here Lua script fix, it will restore "save as" functionality:
Code: | getMainForm().frmAutoInject.SaveAs1.OnClick = getMainForm().Save1.OnClick |
create new file ('fixsaveas.lua' inside autorun) and place above code.
_________________
|
|
Back to top |
|
 |
STN I post too much
Reputation: 43
Joined: 09 Nov 2005 Posts: 2676
|
Posted: Sat Jul 05, 2014 5:56 am Post subject: |
|
|
It was a bug indeed, DB fixed it <3. Everything is working as it should now.
And thanks for the tip about --TRAINERGENERATORSTART--, that is really helpful!.
_________________
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25796 Location: The netherlands
|
Posted: Sat Jul 05, 2014 6:01 am Post subject: |
|
|
place this lua script in your autorun folder to fix it
Code: |
for i=0, getFormCount()-1 do
local f=getForm(i)
if (f.ClassName=='TfrmAutoInject') and (f.SaveAs1.OnClick==nil) then
f.SaveAs1.OnClick=getMainForm().Save1.OnClick
end
end
|
Description: |
|
 Download |
Filename: |
fixtablescript.lua |
Filesize: |
187 Bytes |
Downloaded: |
307 Time(s) |
_________________
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 |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sat Jul 05, 2014 6:12 am Post subject: |
|
|
There's more TfrmAutoInject objects? This one liner works great:
getMainForm().frmAutoInject.SaveAs1.OnClick = getMainForm().Save1.OnClick
_________________
|
|
Back to top |
|
 |
|