Long IF tree with strings
- by DalGr
I have a C program which uses Lua for scripting. In order to keep readability and avoid importing several constants within the individual Lua states, I condense a large amount of functions within a simple call (such as "ObjectSet(id, "ANGLE", 45)"), by using an "action" string.
To do this I have a large if tree comparing the action string to a…