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 


LoadString doesn't work in trainers?

 
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: Fri Sep 14, 2012 3:44 pm    Post subject: LoadString doesn't work in trainers? Reply with quote

Hello Hitler, I am having a major issue with my trainer. I'm trying to use loadstring to prevent my lua script from being stolen in my trainer, when I use the loadstring in the lua engine it runs fine. When I run the script in it's regular form in the trainer and in the lua engine, it runs fine. But when I put it into loadstring, I get this error:
Code:
Error:[string "function CEButton1Click(sender)..."]:2: attempt to call a nil value
The source looks like this:
Code:
function CEButton1Click(sender)
loadstring is here
end

How could I fix this?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 475

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

PostPosted: Fri Sep 14, 2012 4:04 pm    Post subject: Reply with quote

No idea, I never used loadstring, but try executing this in the lua engine. Perhaps it will give an idea where it really goes wrong

Code:

function CEButton1Click(sender)
loadstring is here
end

CEButton1Click(nil)

_________________
Tools give you results. Knowledge gives you control.

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: Fri Sep 14, 2012 8:05 pm    Post subject: Reply with quote

Dark Byte wrote:
No idea, I never used loadstring, but try executing this in the lua engine. Perhaps it will give an idea where it really goes wrong

Code:

function CEButton1Click(sender)
loadstring is here
end

CEButton1Click(nil)


It's still giving me the same error, are the certain files I have to add to my trainer to run loadstring? Or this just some kind of CE bug?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 475

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

PostPosted: Sat Sep 15, 2012 2:15 am    Post subject: Reply with quote

If that gives an error in ce's lua engine when executed, then check for strings ended etc...
Since this is just a functioncall

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
SteveAndrew
Master Cheater
Reputation: 30

Joined: 02 Sep 2012
Posts: 323

PostPosted: Mon Sep 17, 2012 8:26 pm    Post subject: Reply with quote

Hello The0neThe0nly! Laughing I didn't even know you were asking me for help, I just randomly stumbled into this thread and saw my name! lol

Anyway like Dark Byte, I've never used loadstring, is it a lua command or the Win API?

If you still haven't gotten it to work the way you want maybe post a working example, and the non working example. "loadstring is here" isnt valid code. I know you didn't want to share your code, but you could've done it with a random lua script you don't care about to demonstrate.

I will say this though, even if you succeed with what your trying to do, it still wont prevent prying eyes from being able to look at your script. You can't share something without sharing it! lol

You could maybe encode the script with a simple xor encoding or something then decode it when using it. It may confuse some noobs if that's all your trying to do, but wont stop anyone from being able to see the script in plain text.

_________________
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8588
Location: 127.0.0.1

PostPosted: Tue Sep 18, 2012 1:01 am    Post subject: Reply with quote

He used the 'readername' bbcode, which replaces itself with the user looking at the thread.
He wasn't actually asking you directly for help.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
SteveAndrew
Master Cheater
Reputation: 30

Joined: 02 Sep 2012
Posts: 323

PostPosted: Tue Sep 18, 2012 3:27 am    Post subject: Reply with quote

Oh that explains it! Was a bit creeped out by it at first! It's cool though I guess, there wasn't always that feature though! But thanks Wiccaan now I know!
_________________
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 98

Joined: 14 Jul 2007
Posts: 3426

PostPosted: Tue Sep 18, 2012 9:43 am    Post subject: Reply with quote

@The0neThe0nly
There is something here that I don't understand.
Aren't those who know how to extract the LUA code from a trainer know how to debug your trainer, too?
Isn't that the case?
If so, it sounds to me like a shot in your own leg.
Back to top
View user's profile Send private message
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