hello, I made a lua where the script by clicking on the letter Z, the script will automatically open /mechanic menu and select "Sutvarkyti kebula(€500)
but something is wrong with the script, it just throws errors and that's it, and it doesn't open the latest art
	
	
	
		

@Tuzas maybe you have any idea why it's doesnt work?
			
			but something is wrong with the script, it just throws errors and that's it, and it doesn't open the latest art
		Code:
	
	local key = require 'vkeys'
pcall(require, 'sflua')
local sendDialogResponse = false
function main()
    while isSampLoaded() == false do
        wait(5) --Wait 5 milliseconds
    end
    while isSampLoaded() do
        if wasKeyPressed(key.VK_Z) then
            sendDialogResponse = true
        end          
        if sampIsDialogActive() and sendDialogResponse then
            sampSendDialogResponse(2063, 0, 12, ' ')
            sendDialogResponse = false
        end
        wait(5)
    end
end
	
@Tuzas maybe you have any idea why it's doesnt work?