You are running quite an old version of Zeus.I'm using zeus 3.80
I modified your macro to add some extra debug code as shown below:I found a weird result in lua scripting. I wrote the following script as example:
Code: Select all
function key_macro()
debug_enable()
local int t = 8
local int b = 0
local string m = ""
b = (t < 12)
debug_output("( t = " .. t .. " )\n")
if (b) then
debug_output("(t < 12) = True\n")
end -- if
m = "True = "..tostring(b)
b = (t > 12)
if (b) then
debug_output("(t > 12) = True\n")
end -- if
m = m..", False = "..tostring(b).."\n"
debug_output(m)
end
key_macro() -- run the macro
When t is 8 I get this output:About to execute 'd:\temp\test1.lua' macro file
Debug: Initialising macro interface
Debug: debug_enable
Debug: Debug: Macro trace debugging is active.
Debug: debug_output
( t = 18 )
Debug: debug_output
(t > 12) = True
Debug: debug_output
True = false, False = true
Macro produced '10' Warning(s), Error(s) and/or Debug(s) messages.
So for me the macro seems to be working fineAbout to execute 'd:\temp\test1.lua' macro file
Debug: Initialising macro interface
Debug: debug_enable
Debug: Debug: Macro trace debugging is active.
Debug: debug_output
( t = 8 )
Debug: debug_output
(t < 12) = True
Debug: debug_output
True = true, False = false
Macro produced '10' Warning(s), Error(s) and/or Debug(s) messages.

I am not sure why it is not working for you, but I suspect it might have something todo with the version of Lua you are running. The Lua in Zeus 3.95 is version the latest version 5.0, while I think the version in used in Zeus 3.80 is only something like version 4.0.
Cheers Jussi