"do while" there is a limit or it's a bug??

Discussion of Inner Space

Moderators: Lavish Software Team, Moderators

Post Reply
blackwinter
GamingTools Subscriber
Posts: 74
Joined: Sun Jun 25, 2006 8:29 am

"do while" there is a limit or it's a bug??

Post by blackwinter » Fri Apr 08, 2011 9:59 am

use this script below.

Code: Select all

function main()
{
	variable int counter=1
	do
	{
		echo first ${counter} 
		wait 2
		if ${counter}==6
			continue
		echo ${counter} 
		wait 2
	}
	while $&#123;counter&#58;Inc&#125;<=99 && 1<2
&#125;


every time when we use "continue" It will never do +1 Inc.

This only happen when we have more than 2 conditions to check.

while ${counter:Inc}<=99 is ok
while ${counter:Inc}<=99 && 1<2 is broken


So is there a limit or it's a bug??

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Fri Apr 08, 2011 10:06 am

It's a bug. This has been reported before but I haven't had time to fix it yet. I'll check it out today. You can, of course, work around it in the meantime ;)

blackwinter
GamingTools Subscriber
Posts: 74
Joined: Sun Jun 25, 2006 8:29 am

Post by blackwinter » Fri Apr 08, 2011 10:09 am

I suddenly notice this has been like this since 2008. that's why somethings the game freeze and use 100% of the cpu time.

Now I have to change all the scripts use "do while" like this.

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Fri Apr 08, 2011 12:01 pm

This bug is fixed in IS build 5421 (now live)

We can leave out the QQing next time...

blackwinter
GamingTools Subscriber
Posts: 74
Joined: Sun Jun 25, 2006 8:29 am

Post by blackwinter » Sat Apr 09, 2011 1:17 am

great !it's fixed.

Is there a way we can limite the keypress per second?

don't want to send too many keypress in a second. 1 keypress every 1/3 second.

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Sat Apr 09, 2011 8:26 am

Umm... well no there isn't something built into the pressing mechanism... but you can limit the timing of whatever you want in your scripts. There's numerous ways to do things like that. I would say track the value of ${Script.RunningTime} or ${LavishScript.RunningTime} for example (millisecond resolution). Or you can use "wait"s, timedcommands, etc etc.

But you would need to design such a system in your own custom scripts.

Post Reply