If you want to send me a file where you tried to use one of those functions, I can give you an example of what actually should have been done.
Flags in lua are different from flags in the macro system. They're just a way to store true or false in the 'state' table, without worrying about the details. Unlike macro system flags, they keep their current value until you change it.
In your object file (doesn't have to be there, but it is convenient), add lines for each of the flags you want
Code:
flag.define("FlagOne",true) -- FlagOne is true by default
flag.define("FlagTwo",false)-- FlagTwo is false by default
You use flags with the commands
Code:
flag.value("FlagName") -- returns the current value (true or false) of the flag
flag.setTrue("FlagName") -- sets the value of the flag to true
flag.setFalse("FlagName") -- sets the value of the flag to false
flag.toggle("FlagName") -- changes the flag from true to false, or false to true
Remember to have the line
local flag = require("flag")
in any file where you use flags.