Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
applescript help
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Mark FX" data-source="post: 1368809" data-attributes="member: 211556"><p>You have put the statswin, statsLoser, and statsplays variables inside the repeat loop, and</p><p>are setting them back to zero each time the loop runs, try putting them outside the repeat</p><p>loop, then they will retain tere values.</p><p></p><p>Like this</p><p></p><p>[CODE]</p><p>set statswin to 0</p><p>set statsLoser to 0</p><p>set statsplays to 0</p><p>repeat</p><p> --All the other game code in here</p><p>end reepat</p><p>[/CODE]</p><p></p><p>Also I noticed that your repeat loop has no end, so the game will go on forever.</p><p>Try setting the repeat loop to a certain number of tries at the game.</p><p></p><p>Like this.</p><p></p><p>[CODE]</p><p>repeat 10 times</p><p></p><p>end repeat</p><p>[/CODE]</p><p></p><p>Hope this helps.</p><p></p><p>Regards Mark</p></blockquote><p></p>
[QUOTE="Mark FX, post: 1368809, member: 211556"] You have put the statswin, statsLoser, and statsplays variables inside the repeat loop, and are setting them back to zero each time the loop runs, try putting them outside the repeat loop, then they will retain tere values. Like this [CODE] set statswin to 0 set statsLoser to 0 set statsplays to 0 repeat --All the other game code in here end reepat [/CODE] Also I noticed that your repeat loop has no end, so the game will go on forever. Try setting the repeat loop to a certain number of tries at the game. Like this. [CODE] repeat 10 times end repeat [/CODE] Hope this helps. Regards Mark [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
applescript help
Top