Forum

> > CS2D > Scripts > Problem with my while loop
Forums overviewCS2D overview Scripts overviewLog in to reply

English Problem with my while loop

2 replies
To the start Previous 1 Next To the start

old Problem with my while loop

Blighted Song
User Off Offline

Quote
Hey guys, Im just having a bit of a problem with my loop, it is ment to find the lowest number in my array but it comes with the error, "need a 'do' near '=' on line 65

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
avar=1
	bvar=0
	cvar=0
	while cvar=0 do
		if ImageArray[avar]~=bvar then
			avar=avar+1
		end
		if avar=33 then
			avar=1
			bvar=bvar+1
		end
		if ImageArray[avar]=bvar then
		cvar=bvar
		end
	end

line 65 is the start of the while loop.

Im really not sure what I am doing wrong, help is appreciated a lot.

old oops

Blighted Song
User Off Offline

Quote
wow, I can belive I didn't see that, thanks.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview