View previous topic :: View next topic |
Author |
Message |
FIRESKY Newbie cheater Reputation: 0
Joined: 01 Mar 2017 Posts: 16
|
Posted: Mon Aug 07, 2017 9:13 am Post subject: |
|
|
No one really knows how to solve this problem?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Mon Aug 07, 2017 12:04 pm Post subject: |
|
|
script1.Value=CETrainer.CEEdit1.Text
assuming your trainer's Name property is CETrainer and the edit's Name property is CEEdit1
_________________
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 |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Mon Aug 07, 2017 7:27 pm Post subject: |
|
|
In the changed code you no longer get a reference to the memory record you want to change, so CE has no idea what you're trying to change (the memory record provides the address, the type, etc). It's equivalent to saying *magic reference to what I care about* = "what I want" and praying it'll work.
Try printing the values
Code: | function CEButton1Click(sender)
--local script1= addresslist_getMemoryRecordByDescription(getAddressList(), "Exp2")
-- ^ is older syntax the newer version would be
local script1 = getAddressList().getMemoryRecordByDescription("Exp2")
if not script1 then
print('Failed to find the script!')
return
end
print('Value before is: " .. script1.Value)
script1.Value = CETrainer.CEEdit1.Text
print('Value after is: " .. script1.Value)
end |
|
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Mon Aug 07, 2017 9:48 pm Post subject: |
|
|
You don't put in anything for the print statements, they are written exactly as they should be in the code... except that I seem to have used a single quote to start the string and then tried to use a double quote to end it , and then copy pasted lol
make the quotes match (use two single quotes or two double quotes, not one of each). That's what I get for not testing even this short (and fairly simple) code
The point is to print the same value the memory record shows in CE, so you have to pass that value to print (in this case I "concatenated" aka appended or added it to a string so that you know without looking at the code to see the order of the print statements which value is which when you see it printed, helpful with larger scripts with more values).
|
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Mon Aug 07, 2017 10:47 pm Post subject: |
|
|
nearly there
Code: | print("Value before is: script1.Value") |
has script1.Value as part of the literal string so that's what gets printed, but you need lua to understand that you want it to use script1 as a variable and to get the Value property from it so it needs to be written like this
Code: | print("Value before is: " .. script1.Value) |
... I think print can take multiple values in lua so you can probably also do this:
Code: | print("Value before is:", script1.Value) |
but the concatenation allows you to build up a string in a variable pieces at a time and then print it out when you're done so that's what I'm used to doing.
|
|
Back to top |
|
|
FIRESKY Newbie cheater Reputation: 0
Joined: 01 Mar 2017 Posts: 16
|
Posted: Wed Aug 09, 2017 11:45 pm Post subject: |
|
|
I found another way to succeed in what I wanted
Thank you anyway to all those who have come out to help me
I thank the cheat engine community
Tx Too FreeER,
Even if it was not exactly what I wanted, we got better in PM
SOLVED!
|
|
Back to top |
|
|
|