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 


bug when saving lua script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
STN
I post too much
Reputation: 43

Joined: 09 Nov 2005
Posts: 2676

PostPosted: Sat Jul 05, 2014 4:59 am    Post subject: bug when saving lua script Reply with quote

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 ?

_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message  
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sat Jul 05, 2014 5:42 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger 
STN
I post too much
Reputation: 43

Joined: 09 Nov 2005
Posts: 2676

PostPosted: Sat Jul 05, 2014 5:56 am    Post subject: Reply with quote

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!.

_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message  
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Sat Jul 05, 2014 6:01 am    Post subject: Reply with quote

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



fixtablescript.lua
 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
View user's profile Send private message MSN Messenger 
ICQ Number
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sat Jul 05, 2014 6:12 am    Post subject: Reply with quote

There's more TfrmAutoInject objects? This one liner works great:
getMainForm().frmAutoInject.SaveAs1.OnClick = getMainForm().Save1.OnClick

_________________
Back to top
View user's profile Send private message MSN Messenger 
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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