Posted: Sun Apr 02, 2023 7:45 pm Post subject: Error executing the lua when I put the name of a process
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)
function attachInit()
local playerBaseMemoryRecord = playerBaseMemoryRecord = addressList.getMemoryRecord(1)
local entityListMemoryRecord = entityListMemoryRecord = addressList.getMemoryRecord(3)
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 attachInit()
local playerBaseMemoryRecord = playerBaseMemoryRecord = addressList.getMemoryRecord(1)
local entityListMemoryRecord = entityListMemoryRecord = addressList.getMemoryRecord(3)
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