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 


Trainer Generator XM Player bug CE 6.3

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
The0neThe0nly
Expert Cheater
Reputation: 0

Joined: 08 Dec 2009
Posts: 119
Location: In a box

PostPosted: Tue Jul 16, 2013 10:55 pm    Post subject: Trainer Generator XM Player bug CE 6.3 Reply with quote

Because of the change in Lua on 6.3, if you try to use the XM player in your trainer when the trainer code is generated it breaks saying "Invalid class object" when you try to launch your trainer because it attempts to use the old xmplayer_
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Wed Jul 17, 2013 3:24 am    Post subject: Reply with quote

Make sure you downloaded the latest version of Cheat Engine 6.3. ( http://cheatengine.org/download/d1/CheatEngine63.exe )

I tested it with the released build and it works. Open in ce and save as .exe to make it a .exe trainer (also works for me)



testct.ct
 Description:
This seems to work fine

Download
 Filename:  testct.ct
 Filesize:  1.04 MB
 Downloaded:  545 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
The0neThe0nly
Expert Cheater
Reputation: 0

Joined: 08 Dec 2009
Posts: 119
Location: In a box

PostPosted: Wed Jul 17, 2013 3:41 am    Post subject: Reply with quote

Strange, I'm still getting the same error when I generate one.

Code:
--TRAINERGENERATORSTART--
--This is autogenerated code. Changing code in this block will
--get erased and rewritten if you regenerate the trainer code

--Uncomment the following line if this is a Cheat Table format trainer and you don't want CE to show (Tip, save as .CETRAINER alternatively)
--hideAllCEWindows()

RequiredCEVersion=6.3
if (getCEVersion==nil) or (getCEVersion()<RequiredCEVersion) then
  messageDialog('Please install Cheat Engine '..RequiredCEVersion, mtError, mbOK)
  closeCE()
end
addresslist=getAddressList()


control_setVisible(CETrainer_SEPERATOR, false)

strings_add(getAutoAttachList(), "something.exe")
gBeepOnAction=false
form_show(CETrainer)
function AboutClick()
  showMessage(gAboutText)
end
gAboutText=[[This trainer was made by Cheat Engine
www.cheatengine.org]]

function CloseClick()
  closeCE()
  return caFree --onClick doesn't care, but onClose would like a result
end


XMFILE=findTableFile('TRAINERXM')
xmplayer_playXM(XMFILE)

function focusCheck(sender)
  if (form_isForegrounwindow(CETrainer)) then
    if (xmplayer_isPlaying()==false) then
      xmplayer_resume()
    end
  else
    if (xmplayer_isPlaying()) then
      xmplayer_pause()
    end
  end
end

focusTimer=createTimer()
timer_onTimer(focuscheck)
timer_setInterval(focustimer, 250)
control_setEnabled(focustimer, true)

--TRAINERGENERATORSTOP--


I still don't know why. Yours worked fine.

EDIT:
I believe it is the focusCheck function that is breaking it (the one I mentioned earlier with xmplayer_resume stuff maybe?). It isn't in your trainer and when I had it in mine it would break it. I turned it off and set the option to "Stop when game has been attached" and it worked fine.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Wed Jul 17, 2013 3:52 am    Post subject: Reply with quote

hmm, weird. At least one thing:
form_isForegrounwindow should be form_isForegroundWindow (or CETrainer.isForegroundWindow() )

for the invalid class not sure yet. I'll check it (it does play the music)

another thing
change
Code:

timer_onTimer(focuscheck)

to
Code:

timer_onTimer(focusTimer, focusCheck)

Still that error though

(no one ever tested the focus in the beta ? )

_________________
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


Last edited by Dark Byte on Wed Jul 17, 2013 3:57 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
The0neThe0nly
Expert Cheater
Reputation: 0

Joined: 08 Dec 2009
Posts: 119
Location: In a box

PostPosted: Wed Jul 17, 2013 3:57 am    Post subject: Reply with quote

Nice catch, although I didn't really look it over too well Confused

All of this is generated, but I'll change my trainer using that, thanks.
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: Wed Jul 17, 2013 4:05 am    Post subject: Reply with quote

@Dark Byte
Maybe another unbalanced LUA stack?

_________________
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Wed Jul 17, 2013 4:05 am    Post subject: Reply with quote

no, just typos and disregarding charcase and forgetting parameters

and control_setEnabled should have been timer_setEnabled or just ignored at all (already active)

the focus code should be this:
Code:

function focusCheck(sender)
  if (form_isForegroundWindow(CETrainer)) then
    if (xmplayer_isPlaying()==false) then
      xmplayer_resume()
    end
  else
    if (xmplayer_isPlaying()) then
      xmplayer_pause()
    end
  end
end

focusTimer=createTimer(nil)
timer_onTimer(focusTimer, focusCheck)
timer_setInterval(focusTimer, 250)

_________________
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
mgr.inz.Player
I post too much
Reputation: 222

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

PostPosted: Wed Jul 17, 2013 4:12 am    Post subject: Reply with quote

yeah, I see: focustimer instead of focusTimer
_________________
Back to top
View user's profile Send private message MSN Messenger
The0neThe0nly
Expert Cheater
Reputation: 0

Joined: 08 Dec 2009
Posts: 119
Location: In a box

PostPosted: Wed Jul 17, 2013 4:13 am    Post subject: Reply with quote

So the trainer generator isn't generating focusCheck function right in the xm player? At first I thought I was mistaken and it was just some part of my code in my trainer that was messing it up but I began noticing it in all my trainers, so I started looking around a bit more for the reason and I noticed that if the xm player was off it worked fine. As always, thanks Dark Bye. Razz

And this will be fixed in some newer version, right?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Wed Jul 17, 2013 4:15 am    Post subject: Reply with quote

this will be fixed for ce 6.4
But no idea when that comes out. (perhaps I might release it sooner than june/july 2014, but don't hold your breath...)

In the meantime, generate as script, fix the code, and then save as exe.
Or compile the svn which has the fix in it already

_________________
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
mgr.inz.Player
I post too much
Reputation: 222

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

PostPosted: Wed Jul 17, 2013 4:32 am    Post subject: Reply with quote

Off topic
Dark Byte wrote:
this will be fixed for ce 6.4
But no idea when that comes out. (perhaps I might release it sooner than june/july 2014, but don't hold your breath...)

So, those asm/disasm bugs I reported (id 259) will be fixed in CE6.4? Where's my oxygen container. Wink

_________________
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Wed Jul 17, 2013 4:38 am    Post subject: Reply with quote

They will be fixed eventually yes. But right now i'm working an another part of CE where I first have to do a lot of research and experimenting (and I usually work very slow during the summer months)

(fixing the asm instructions is pretty easy, just very boring)

_________________
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
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