doc: add note about constants in lua, fix lua example (scripting guide)