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 


Unable to write value(s) to process (FIFA15.exe)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
JRagen
How do I cheat?
Reputation: 0

Joined: 15 Oct 2014
Posts: 8

PostPosted: Wed Oct 15, 2014 3:37 pm    Post subject: Unable to write value(s) to process (FIFA15.exe) Reply with quote

Hello,

Excuse my new-ness. I've just begun learning how to script and use CE in general. Wink

Recently I have been trying to execute a LUA script that I coded for FIFA 15, but when the code executes, no values change in-game. This same script worked for FIFA 14, which was a 32-bit executable, but does not work for 64-bit FIFA 15. I'm sure I found the correct pointers because I am able to change the value in the address-list box and see an effect when I play. Is FIFA 15 protected in some way from writing values to memory? I also tried executing a LUA script that just wrote one value, without a loop, to memory, but no dice.

Here are my system specs (laptop) if they are needed:

Core i7 3630-qm
8 gb ram
Nvidia GTX 675MX
Windows 7 64-bit
(DBVM works too)

I have also attached the script for reference. Only the first bit of it actually is important because the rest is a copy-paste.

Thank you for your help.
EDIT: Script had an error. Will re-upload when fixed. (Missing brackets for the pointers)



Test.LUA
 Description:
My ugly code:

Download
 Filename:  Test.LUA
 Filesize:  81.49 KB
 Downloaded:  619 Time(s)

Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Wed Oct 15, 2014 3:58 pm    Post subject: Reply with quote

Try reading the value, to make sure you do have the right pointer
_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
JRagen
How do I cheat?
Reputation: 0

Joined: 15 Oct 2014
Posts: 8

PostPosted: Wed Oct 15, 2014 4:03 pm    Post subject: Reply with quote

Thanks, I'll go ahead and try that right now.

EDIT: Now I'm getting an access violation as my script executes. There's probably something simple that I am missing.
Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Wed Oct 15, 2014 4:20 pm    Post subject: Reply with quote

JRagen wrote:
Thanks, I'll go ahead and try that right now.

EDIT: Now I'm getting an access violation as my script executes. There's probably something simple that I am missing.


Don't try your scripts, and restart cheat engine
Your script has a loop which could be the reason for the access violation

Try this for example
Code:
print("Value pCPUSprintSpeed - " .. readInteger(pCPUSprintSpeed));

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
JRagen
How do I cheat?
Reputation: 0

Joined: 15 Oct 2014
Posts: 8

PostPosted: Wed Oct 15, 2014 4:47 pm    Post subject: Reply with quote

I've tried and found out that the pointer is referencing a nil value, but when I add the same pointer to the address list, it points to the correct address and value: 50. Screenshot attached.


Debug.PNG
 Description:
 Filesize:  33.93 KB
 Viewed:  20830 Time(s)

Debug.PNG


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Wed Oct 15, 2014 4:50 pm    Post subject: Reply with quote

add a
Code:

reinitializeSymbolhandler()

after openProcess()

_________________
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
JRagen
How do I cheat?
Reputation: 0

Joined: 15 Oct 2014
Posts: 8

PostPosted: Wed Oct 15, 2014 4:56 pm    Post subject: Reply with quote

Still getting an error?


Debug2.PNG
 Description:
 Filesize:  40.34 KB
 Viewed:  20814 Time(s)

Debug2.PNG


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Wed Oct 15, 2014 5:25 pm    Post subject: Reply with quote

then try:
pCPUSprintSpeed = getAddress('[["fifa15.exe"+02a97ad0]+50]+248')
or
readInteger('[[fifa15.exe+02a97ad0]+50]+248')
or
readInteger(readInteger(readInteger("fifa15.exe"+02a97ad0)+0x50)+0x248)


also change openProcess("fifa15.exe") to
if openProcess("fifa15.exe")==nil then showMessage("This is why") end

_________________
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
JRagen
How do I cheat?
Reputation: 0

Joined: 15 Oct 2014
Posts: 8

PostPosted: Wed Oct 15, 2014 5:30 pm    Post subject: Reply with quote

Thanks, DB. I'll try that ASAP and report back.

Results:

The first tip produces:

"Error:Failure determining what [["fifa15.exe"+02a97ad0]+50]+248 means"

The second:

Still produces a nil output.

The third:

" Script Error:[string "--if openProcess("fifa15.exe")==nil then..."]:8: malformed number near '02a97ad0' "

I tried the fourth and openProcess("fifa15.exe") does not result in nil.

Maybe it's my laptop, or the exe has some sort of protection.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Wed Oct 15, 2014 6:55 pm    Post subject: Reply with quote

sorry, third one should have had a 0x in front

oh yes, make sure to never ever name any of your trainers fifa15.exe

_________________
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
JRagen
How do I cheat?
Reputation: 0

Joined: 15 Oct 2014
Posts: 8

PostPosted: Thu Oct 16, 2014 11:56 am    Post subject: Reply with quote

Dark Byte wrote:
sorry, third one should have had a 0x in front

oh yes, make sure to never ever name any of your trainers fifa15.exe


Thanks again.
None of my trainers are named fifa15.exe.
I'll try this out later today, and if it doesn't work, I'll also try all the methods you've mentioned on my desktop pc.

If all else fails:
Do you think that I should convert my script to auto-assembler or C++? Is there a way to generate random numbers in auto-assembler?

Report:

Nope, still doesn't work. I also cannot attach the debugger, if that makes any difference. Seems like the exe is protected from CE's routines. Even the kernelmode debugger, which attaches without any error messages, crashes when attempting to find out what accesses or points to an address.
Thanks for your help anyways, Dark Byte and DaSpamer.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Thu Oct 16, 2014 3:52 pm    Post subject: Reply with quote

according to this image: http://forum.cheatengine.org/files/debug_729.png you can open it and read memory fine

So, do a step by step to see where it goes wrong.
Tip: You can also access memory records with lua and read/write their values as well

Tip2: Try getting rid of that openProcess call and attach CE to it manually beforehand



Also, veh debugger with page exception breakpoints sometimes work where debug registers won't

_________________
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
JRagen
How do I cheat?
Reputation: 0

Joined: 15 Oct 2014
Posts: 8

PostPosted: Thu Oct 16, 2014 4:13 pm    Post subject: Reply with quote

Okay, I'll read up on the main.lua and see how changing the memory records goes first. Hopefully this works because the memrecords correctly list the address and its value, and changing that value has an effect in-game.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Thu Oct 16, 2014 4:53 pm    Post subject: Reply with quote

Perhaps there is a second process named fifa15.exe
openProcess with a processname always open the last one in the list. But that can be a wrong one

Also, if you need to use kernelmode openprocess for normal workings, you need to put that in your trainers as well

_________________
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
JRagen
How do I cheat?
Reputation: 0

Joined: 15 Oct 2014
Posts: 8

PostPosted: Thu Oct 16, 2014 7:41 pm    Post subject: Reply with quote

Seem to have gotten it to work for the first time!
This might be a bit more tedious than the old writeInteger method, but it works and that's all that matters. Hopefully I don't run into issues anymore.
Smile



Debug 2.PNG
 Description:
 Filesize:  637.78 KB
 Viewed:  20564 Time(s)

Debug 2.PNG


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 Lua Scripting 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