View previous topic :: View next topic |
Author |
Message |
Branimir Advanced Cheater Reputation: 0
Joined: 12 May 2015 Posts: 58
|
Posted: Tue May 12, 2015 11:28 pm Post subject: LUA script error |
|
|
Can someone tell me what went wrong with my trainer?
I added a .xm music file to it (Beautiful Insanity.xm) and then all hell broke loose... (Works like a charm without the .xm file).
(Yes, if it wasn't obvious enough already, I'm a complete noob when it comes to LUA).
OS: Windows 7 Home Premium 64-bit
Cheat Engine version 6.4
I will attach a picture of the problem to this post.
If anyone can help, I'd be grateful.
Edit:
Okay, so I found this LUA script when Googling for the .xm error:
methods
playXM(filename, OPTIONAL noloop)
playXM(tablefile, OPTIONAL noloop)
playXM(Stream, OPTIONAL noloop)
pause()
resume()
stop()
But, what do I do with it?
Description: |
|
Filesize: |
242.71 KB |
Viewed: |
23925 Time(s) |
|
Last edited by Branimir on Tue May 12, 2015 11:38 pm; edited 1 time in total |
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Tue May 12, 2015 11:38 pm Post subject: |
|
|
You're attempting to call field 'isPlayer' (a boolean value)
Don't do that.
Bad:
Good:
|
|
Back to top |
|
|
Branimir Advanced Cheater Reputation: 0
Joined: 12 May 2015 Posts: 58
|
Posted: Tue May 12, 2015 11:40 pm Post subject: |
|
|
Zanzer wrote: | You're attempting to call field 'isPlayer' (a boolean value)
Don't do that.
Bad:
Good:
|
Thanks for replying. I'll try your tip now.
Edit:
I tried your code/script, but now I got a different error:
Description: |
|
Filesize: |
233.32 KB |
Viewed: |
23909 Time(s) |
|
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Wed May 13, 2015 12:08 am Post subject: |
|
|
Perhaps if you would post the code you're trying to modify, we can help.
|
|
Back to top |
|
|
Branimir Advanced Cheater Reputation: 0
Joined: 12 May 2015 Posts: 58
|
Posted: Wed May 13, 2015 12:09 am Post subject: |
|
|
Zanzer wrote: | Perhaps if you would post the code you're trying to modify, we can help. |
...What do you mean by that?
I'm not trying to modify anything.
I just want to put a .xm file into my trainer.
|
|
Back to top |
|
|
Fluffer_Nutter Advanced Cheater Reputation: 0
Joined: 26 Feb 2015 Posts: 67
|
Posted: Wed May 13, 2015 12:11 am Post subject: |
|
|
Branimir wrote: | Zanzer wrote: | Perhaps if you would post the code you're trying to modify, we can help. |
...What do you mean by that?
I'm not trying to modify anything.
I just want to put a .xm file into my trainer. |
He means post the CT file so the error can be seen and corrected. Cant help what you cant see.
|
|
Back to top |
|
|
Branimir Advanced Cheater Reputation: 0
Joined: 12 May 2015 Posts: 58
|
|
Back to top |
|
|
Fluffer_Nutter Advanced Cheater Reputation: 0
Joined: 26 Feb 2015 Posts: 67
|
Posted: Wed May 13, 2015 1:01 am Post subject: |
|
|
Here is a CT file with Play, Pause, Resume, Stop.
Or just load it when the file loads. The world is yours buddy.
Cheers.
- Fluffer Nutter
Description: |
|
Download |
Filename: |
Fixed XM sound player.CT |
Filesize: |
1.12 MB |
Downloaded: |
815 Time(s) |
|
|
Back to top |
|
|
Branimir Advanced Cheater Reputation: 0
Joined: 12 May 2015 Posts: 58
|
Posted: Wed May 13, 2015 1:23 am Post subject: |
|
|
Fluffer_Nutter wrote: | Here is a CT file with Play, Pause, Resume, Stop.
Or just load it when the file loads. The world is yours buddy.
Cheers.
- Fluffer Nutter |
...You are amazing! This is exactly what I was looking for!
|
|
Back to top |
|
|
Branimir Advanced Cheater Reputation: 0
Joined: 12 May 2015 Posts: 58
|
Posted: Thu Oct 22, 2015 12:05 pm Post subject: |
|
|
Well, I have enjoyed Fluffer_Nutter's cheat table fix for quite some time now,
but I believe it is time for me to finally learn how people like Fling
(Chinese trainer maker from 3DMgame) makes trainers with sounds in them.
(Without any need for extra windows like Fluffer_Nutter's ct file).
So... Can anyone here tell me what is needed when making a standalone trainer
(.exe) with .xm music embedded directly in it like it is in his/her trainer?
I have all the skills needed when editing the trainer via the Form Designer.
However...adding music is still unknown to me.
(I keep getting the error from my earlier posts).
I will add the picture with the "Play .xm music file" option as an attachment.
Description: |
|
Filesize: |
3.59 KB |
Viewed: |
22203 Time(s) |
|
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Thu Oct 22, 2015 10:54 pm Post subject: |
|
|
I made a simple music tool / player using CE Form Design and lua.
Maybe it can help or useful for you.
Instruction :
1. Download a simple (small 150 kb) of music player called 1by1.exe
link : https://www.mediafire.com/?6cdkduwjf8qh480
2. Once download finish, extract it and put file 1by1.exe into same foder
with the ct file (attached)
3. Run CT file and try it by your self
4. You able to edit script / form inside CT file and save it as CETrainer or exe
Code: |
------ Avoid lua engine pop-up
getLuaEngine().cbShowOnPrint.Checked=false
getLuaEngine().hide()
------ Setting Clock
t=createTimer(nil)
t.Interval=1000
t.OnTimer=function(t)
control_setCaption(MyForm.Lbl_Jam, tostring(os.date()))
end
t.Enabled=true
------ Set Single XM Music Tester
function Btn_XMTestClick(sender)
xmplayer.playXM( findTableFile('sweetdre.xm') )
end
--
function Btn_XMPauseClick(sender)
xmplayer_pause()
end
--
function Btn_XMResumeClick(sender)
xmplayer_resume()
end
--
function Btn_XMStopClick(sender)
xmplayer_stop()
end
--
function Btn_OpenMP3Click(sender)
if TrainerOrigin~=nil then
path=TrainerOrigin
else
path=getCheatEngineDir()
end
if string.sub(path,#path, #path)~="\\" then
path=path.."\\"
end
shellExecute(path.."1by1")
end
--
function Btn_ExitClick(sender)
closeCE();
return caFree
end
|
regards
Description: |
|
Filesize: |
189.29 KB |
Viewed: |
22117 Time(s) |
|
Description: |
A sample tool for music player using CE and lua |
|
Download |
Filename: |
CRDR-MusicTool-Ver.1.2.CT |
Filesize: |
486.01 KB |
Downloaded: |
935 Time(s) |
|
|
Back to top |
|
|
lolAnonymous Expert Cheater Reputation: 1
Joined: 19 Jul 2015 Posts: 154
|
Posted: Fri Oct 23, 2015 1:21 am Post subject: |
|
|
hey Branimir leave the xm music its old why don't u try the new mp3 music function...
|
|
Back to top |
|
|
Branimir Advanced Cheater Reputation: 0
Joined: 12 May 2015 Posts: 58
|
Posted: Fri Oct 23, 2015 5:57 am Post subject: |
|
|
@Corroder
I thank you for your CT and I have already started tinkering with it.
However... Can you tell me why my trainer refuses to work when I give it an
.xm file from the auto trainer generator? The LUA box/window in Cheat Engine is blank.
Is that the problem? I tried using if isPlayer then as per Zanzer's suggestion
(It's in my Neighbors From Hell.ct in my earlier posts), but that didn't help either.
(I have ZERO knowledge in both LUA and programming)
@MasterHacking321
Was there such a function? (I'm using Cheat Engine 6.4 and I can't see it)
Guys... This is depressing... Will I ever be able to put an .xm file into my trainers... Why must it be so hard and unnerving...
Can't Dark Byte fix the Play XM file option in Cheat Engine? Sigh...
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Fri Oct 23, 2015 10:01 am Post subject: |
|
|
Branimir, are you added the XM file as stream file into your CT trainer ?.
You can add XM file which you want to play into your trainer as autoplay or by a CEButtonClick(sender).
Here for example :
1. Auto play when you open your trainer
Say we we have a music file name "blabla.XM", then you want XM Player play it automatic when you open your trainer (put this code to the top of your trainer script and you already add blabla.XM as stream file, by click in CE menu > Table > add file) :
Code: |
xmplayer.playXM( findTableFile('blabla.xm') )
|
2. Play, Pause, Resume and Stop XMPlayer
Say you made a CE Trainer form with 4 buttons to control XMPlayer.
The buttons name are CEButton1, CEButton2, CEButton3, CEButton4
To control XMPlayer :
Code: |
functionCEButton1Click(sender)
xmplayer.playXM( findTableFile('blabla.xm') ) --- Play music
end
---
function CEButton2Click(sender)
xmplayer_pause() --- Pause music
end
---
function CEButton3Click(sender)
xmplayer_resume() ---- Resume / continue music
end
---
function CEButton4Click(sender)
xmplayer_stop() ----- stop music
end
|
I am also open your CT file and just found blank cheat table there. (no idea what happen). Anyhow, try to make a simple CE Trainer using Form Designer shall help you much to understand many things.
A picture to explaining simple tester XMPlayer CT file has attached which you can review or edit.
Description: |
|
Filesize: |
100.12 KB |
Viewed: |
22031 Time(s) |
|
Description: |
|
Download |
Filename: |
Fixed XM sound player.CT |
Filesize: |
1.12 MB |
Downloaded: |
2687 Time(s) |
|
|
Back to top |
|
|
Branimir Advanced Cheater Reputation: 0
Joined: 12 May 2015 Posts: 58
|
Posted: Fri Oct 23, 2015 11:04 am Post subject: |
|
|
... ... ...IT WORKS!!!
I cannot believe that all it took was 1 line of code.
Code: | xmplayer.playXM( findTableFile('blabla.xm') ) |
(Which was already in Fluffer_Nutter's CT file to begin with...but I was too retarded to figure it out)
I am...truly...forever in your debt!
Btw... I really am crying right now. Q_Q
THAT'S how happy I am!
Oh and, you don't need to add the .xm file via CE menu > Table > add file.
Adding it through the trainer generator is enough.
(Was curious so I tested it out).
Again... I thank you from the bottom of my being for your aid!!
(And to Fluffer_Nutter as well).
|
|
Back to top |
|
|
|