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 


Error executing the lua when I put the name of a process

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Rule-12
How do I cheat?
Reputation: 0

Joined: 02 Apr 2023
Posts: 1

PostPosted: Sun Apr 02, 2023 7:45 pm    Post subject: Error executing the lua when I put the name of a process Reply with quote

Error executing this table's lua script: [string "local processName = 'hl2.exe'
..."]:42: unexpected symbol near '='
Code:
local processName = 'hl2.exe'
local hasProcessAttachedInit
local hasProcessAttached

local addressList
local activateSound
local deactivateSound

local jumpFlag
local jumpFunction

local isBunnyHopToggled
local isTriggerbotToggled

local jumpKey = VK_SPACE
local bunnyHopKey = VK_T
local triggerBotKey = VK_R

function main()
init()
run()
end

function init()
local attachTimer = createTimer(nil)
local mainTimer = createTimer(nil)

addressList = getAddressList()
activateSound = findTableFile('Activate')
deactivateSound = findTableFile('Deactivate')

attachTimer.setInterval(5000)
attachTimer.setOnTimer(attachToProcess)

mainTimer.setInterval(100)
mainTimer.setOnTimer(run)

TF2Bot.show()
end

function attachInit()
local playerBaseMemoryRecord = playerBaseMemoryRecord = addressList.getMemoryRecord(1)
local entityListMemoryRecord = entityListMemoryRecord = addressList.getMemoryRecord(3)

createHotkey('bunnyHopToggle', bunnyHopKey)
createHotkey('triggerbotToggle', triggerBotKey)

jumpFlag =
end

function run()
if isBunnyHopToggled then
doKeyPress(jumpKey)
end
end

function bunnyHopToggle(sender)
if not isBunnyHopToggled then
playSound(activateSound)
else
playSound(deactivateSound)
end

isBunnyHopToggled = not isBunnyHopToggled
end

function triggerbotToggle(sender)
if not isTriggerbotToggled then
playSound(activateSound)
else
playSound(deactivateSound)
end

isTriggerbotToggled = not isTriggerbotToggled
end

function attachToProcess(timer)
if not hasProcessAttached and getProcessIDFromProcessName(processName) ~= nil then
sleep(2000)
openProcess(processName)
elseif hasProcessAttached and getProcessIDFromProcessName(processName) == nil then
TF2Bot.attachedLabel.Caption = 'Not Attached'
TF2Bot.attachedLabel.Font.Color = 0x0000FF

isBunnyHopToggled = false
isTriggerBotToggled = false
hasProcessAttached = false
end
end

function onOpenProcess()
if not hasProcessAttachedInit then
attachInit()

hasProcessAttachedInit = true
end

if not hasProcessAttached then
TF2Bot.attachedLabel.Caption = 'Attached'
TF2Bot.attachedLabel.Font.Color = 0x00FF00

hasProcessAttached = true
end
end

function aboutSubMenuItemClick(sender)
showMessage('Use TF2Bot to bot in Team Fortress 2!')
end

function optionsSubMenuItemClick(sender)

end

function exitSubMenuItemClick(sender)
formClose(sender)
end

function formClose(sender)
closeCE()

return caFree
end

main()
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1069
Location: 0x90

PostPosted: Tue Apr 04, 2023 8:39 am    Post subject: Reply with quote

This is your problem
Code:

function attachInit()
local playerBaseMemoryRecord = playerBaseMemoryRecord = addressList.getMemoryRecord(1)
local entityListMemoryRecord = entityListMemoryRecord = addressList.getMemoryRecord(3)

createHotkey('bunnyHopToggle', bunnyHopKey)
createHotkey('triggerbotToggle', triggerBotKey)

jumpFlag =
end


playerBaseMemoryRecord and entityListMemoryRecord are duplicated. Also, you haven't assigned anything to jumpFlag.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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