|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
bananapowers How do I cheat? Reputation: 0
Joined: 12 Nov 2022 Posts: 6
|
Posted: Sat Nov 12, 2022 10:20 am Post subject: problem with a script. |
|
|
hello this script seem to work but i dont know why i can't check the box.
Code: | [ENABLE]
{$lua}
if syntaxcheck then return end
if process and readInteger(process) ~= 0 then mono_initialize() LaunchMonoDataCollector() end
local extraDebug = false
local GCD = mono_class_findInstancesOfClassListOnly(mono_enumDomains()[1],mono_findClass('','GameContentData'))[1]
local cGDCData = 0
function getContents(p,l)
for z = 0,l*4-4,4 do
local cData = readInteger(readInteger(p) + 0x10 + z)
local cKey = readString(readInteger(cData + 0x8) + 0x0C,1000,true)
if z == l*4-4 then
DumpFile:write(' ' .. cKey,"\n\n")
else
DumpFile:write(' ' .. cKey,"\n")
end
--print(readString(readInteger(cData + 0x8) + 0x0C,500,true))
end end
local offsetTable = mono_class_enumFields(mono_findClass('','GameContentData'))
DumpFile = io.open(getCheatEngineDir() .. 'BootyCallsDump.txt', "w+")
for i = 1,#offsetTable do
if (offsetTable[i].isStatic) == false then
if string.match((offsetTable[i].name), "DataDict") then break end
--print(offsetTable[i].name)
local gp = GCD + offsetTable[i].offset
local p = readPointer(gp) + 0x08
local l = readInteger(p + 0x04)
if l ~= 0 then
local cGDCData = i
if cGDCData == i then DumpFile:write(string.format('[' .. offsetTable[i].name .. ']\n')) end
getContents(p,l)
end end end
DumpFile:close()
shellExecute(getCheatEngineDir():gsub("%\\", "\\\\") .. 'BootyCallsDump.txt')
[DISABLE]
|
this script is supposed to create a txt file from a game, to get every id of the game content. can someone help me? also i have no idea where the txt is supposed to be created.
hope u can help me! thx! |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sun Nov 13, 2022 12:58 am Post subject: |
|
|
rightclick the record when it fails to activate and check the top menuitem. It'll contain the error _________________
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 |
|
|
bananapowers How do I cheat? Reputation: 0
Joined: 12 Nov 2022 Posts: 6
|
Posted: Sun Nov 13, 2022 10:09 am Post subject: |
|
|
first of all thank you for the answer.
aight so the error is:
<<lua error in the script at line 2:[string "local syntaxcheck,memrec=... ..."]
:attempt to perform arithmectic on nil value>>
i have no idea how to fix it.I have another script with lua and it work perfetly fine. |
|
Back to top |
|
|
LocutusOfBlog How do I cheat? Reputation: 0
Joined: 28 Nov 2022 Posts: 7 Location: Narnia
|
Posted: Mon Nov 28, 2022 9:06 pm Post subject: |
|
|
bananapowers wrote: | first of all thank you for the answer.
aight so the error is:
<<lua error in the script at line 2:[string "local syntaxcheck,memrec=... ..."]
:attempt to perform arithmectic on nil value>>
i have no idea how to fix it.I have another script with lua and it work perfetly fine. |
Is there a line number after the ... ..."] ?
Something like:
<<lua error in the script at line 2:[string "local syntaxcheck,memrec=... ..."]
:23: attempt to blah blah blah I forgot a close ")" here. Syntax errors are my life now. >>
P.S. I just took a dive into your code and I saw something that might be causing it.
Code: |
local GCD = mono_class_findInstancesOfClassListOnly(mono_enumDomains()[1],mono_findClass('','GameContentData'))[1]
|
I think the "[1]" at the end of that statement might be an artifact from a copypasta and does not belong there. It is a simple mistake and it happens to a lot of us, so please don't feel bad.
Also, for the sanity of those reading your code, please consider tabbing.
For example:
Code: | if (offsetTable[i].isStatic) == false then
if string.match((offsetTable[i].name), "DataDict") then break end
--print(offsetTable[i].name)
local gp = GCD + offsetTable[i].offset
local p = readPointer(gp) + 0x08
local l = readInteger(p + 0x04)
if l ~= 0 then
local cGDCData = i
if cGDCData == i then DumpFile:write(string.format('[' .. offsetTable[i].name .. ']\n')) end
getContents(p,l)
end end end |
This gave me a stroke
To make it easier to analyze, you could put something like:
Code: |
if (offsetTable[i].isStatic) == false then
if string.match((offsetTable[i].name), "DataDict") then
break
end
--print(offsetTable[i].name)
local gp = GCD + offsetTable[i].offset
local p = readPointer(gp) + 0x08
local l = readInteger(p + 0x04)
if l ~= 0 then
local cGDCData = i
if cGDCData == i then DumpFile:write(string.format('[' ..
offsetTable[i].name .. ']\n'))
end
getContents(p,l)
end
end
|
I'm not trying to trash you in any way. Just a friendly suggestion. BTW, I made a post recently about some issues with instances. If you have any advice or answers, I could use the help. |
|
Back to top |
|
|
bananapowers How do I cheat? Reputation: 0
Joined: 12 Nov 2022 Posts: 6
|
Posted: Wed Jan 18, 2023 6:15 am Post subject: |
|
|
fist of all sorry for responding 2 months later.
thanks you for taking the time to help me.
Quote: | Is there a line number after the ... ..."] ? |
yes its :26: . im a noob at coding lol.
Quote: | P.S. I just took a dive into your code and I saw something that might be causing it.
Code:
local GCD = mono_class_findInstancesOfClassListOnly(mono_enumDomains()[1],mono_findClass('','GameContentData'))[1] |
so i tried it like this
Code: |
local GCD = mono_class_findInstancesOfClassListOnly(mono_enumDomains()[1],mono_findClass('','GameContentData'))
|
the script still dont seem to work
Quote: | Also, for the sanity of those reading your code, please consider tabbing.
|
im sorry ab that im pretty new i will try my best to help the reader next time
Quote: |
I'm not trying to trash you in any way. Just a friendly suggestion. BTW, I made a post recently about some issues with instances. If you have any advice or answers, I could use the help. |
dont worry im the one to blame. im not sure i can help you with ur need tho im pretty bad at coding. lol
hope u can help me again. |
|
Back to top |
|
|
|
|
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
|
|