Ascending numbers?

Posted by LCore on Thu 08 Mar 2012 09:29 AM — 2 posts, 10,689 views.

#0
I'm working on a script that sends a command to the world that includes the number 00001, then if I get a certain response, goes to 00002, and so on. And if it gets a different response than usual, ends.

Not sure how to set up the ascending number part, although I'm afraid it's probably awfully simple and I'm missing something. Any help would be great, though. Thanks!
Australia Forum Administrator #1
You want the leading zeros? Look up string.format.

As for the numbers, just store the current one in a global variable (in a script) and then each time the trigger fires, add 1 to it.