Home   Help Search Login Register  

Author Topic: run a file 10 passes, need help with sqs code!!  (Read 1417 times)

0 Members and 1 Guest are viewing this topic.

Offline Cougarxr7

  • Members
  • *
run a file 10 passes, need help with sqs code!!
« on: 23 May 2009, 18:56:27 »
Here's what I have. I've tried so many different code combos, nothing worked.
Please help!

#start
; a loop repeating 10 times
for [{_i=0}, {_i<10}, {_i=_i+1}]
   goto "LOOP" (to repeat 10 times)
else
   goto "end" (after 10 passes it stops)

#loop
"text to run"
goto "start"

#end
hint "GOODBYE, YOU GOT IT TO WORK FINALLY"
exit
It's like the game engine can't count or add, of course thats not true it's me and my inability

to get the code right!

Thanks!
If this thread is in volation of forum rules , please delete.

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: run a file 10 passes, need help with sqs code!!
« Reply #1 on: 23 May 2009, 19:28:56 »
Code: [Select]
player sideChat "go!"

_counter = 5;
#loop

; do stuff here
player sideChat "busy..."

_counter = _counter - 1
? _counter > 0 : goto "loop"

player sideChat "done"
try { return true; } finally { return false; }

Offline Cougarxr7

  • Members
  • *
Re: run a file 10 passes, need help with sqs code!!
« Reply #2 on: 24 May 2009, 00:56:13 »
That worked very well, Thanks!
If this thread is in volation of forum rules , please delete.