In SX Microcontrollers, SX/B Compiler and SX-Key Tool, couch-pilot wrote: You could try this too: [code] Main: level = level + level_up ;; wont increase if not level_up level = level - level_down ;; wont decrease if not level_down IF level >= 4 THEN level = 4 ENDIF IF level <= 1 THEN level = 1 ENDIF Set_level level ;; GOTO Main [/code] -Benoit ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=243116#m243134 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)