Weird while() loop not finishing run.
#1

pawn Код:
new ARRAY[12];


forward WhileTimer();

public WhileTimer()
{
    print("CALL TEH FUNCTION BITCH");
    new VARCOUNTDOWN;
    VARCOUNTDOWN = 12;

    while(VARCOUNTDOWN > 0)
    {
        print("LOOP HAS TEH BEEN CALLED"); // Last Print before it mysteriously stops.
        if(random(2) == 0)
        {
            print("IS IT FUCKED!?!?!?");
            new VAR;
            VAR = random(10);
            ARRAY[VARCOUNTDOWN] = ARRAY[VARCOUNTDOWN] + VAR;
            print("DEBUG MOTHERFUCKER");
           
        }
           
        else

        {
           
            new VAR2;
            new VAR3;
            VAR2 = random(10);
            VAR3 = VAR2 - VAR2 * 2;
            ARRAY[VARCOUNTDOWN] = ARRAY[VARCOUNTDOWN] + VAR3;
            print("DEBUG MOTHERFUCKER #2");
           
        }

        printf("%d : %d",VARCOUNTDOWN,ARRAY[VARCOUNTDOWN]);
        VARCOUNTDOWN--;
        print("DEBUG MOTHERFUCKER #3");
    }
   
}
It worked perfectly as a function but the While would be more efficient, Advice and help would be appreciated.
Reply
#2

EDIT: Well I am a complete noob, Thank you very much for the help ******.

EDIT2: rep++ for you, even though it probably will not make the slightest difference for your nearly 500 rep.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)