Also, as said by Ralph, stay in "Create/Edit" tab while testing and editing your LUA script
viewtopic.php?p=5072#p5072
any change other than text will require to unload the gauge and in some situation (with major change on gauge) to close and restart AM3
Best regards