Jump to content


enkido

Member Since 16 Apr 2012
Offline Last Active Jul 23 2012 02:17 PM

Topics I've Started

Problem with 2 FOR and 1 While

16 April 2012 - 08:13 PM

Hi
am doing a game like checkers.
At some point i need to draw some sprites, i have a script (he ask for arguments and draw) but he need the positions, so am doing a a another script (below)
but i have no idea what is wrong :(
any ideas?

bubbles = 0

while(bubbles<global.lvl)
{
    for(i=0;i<global.lvl;i=i+1)
    {
        for(j=0;j<global.lvl;j=j+1)
        {
            A[i,j]=choose(0,1)
            
                if(A[i,j]=1)
                {
                    bubbles +=1
                    
                }
                
            }
    }
}