Page 1 of 1

Problem setting conditions of function.

PostPosted: Mon Feb 10, 2014 10:25 am
by bat78
img0.png
img0.png (5 KiB) Viewed 1408 times


function:
Code: Select all
int f_timer(int f_seconds)
{
    int frame;
    frame++;
 
 
    if (frame >= f_seconds*30) { return 1; }
    else { return 0; }
}


obj1:
Code: Select all
int i = f_timer(5);
if (f_timer(5) == 0) ExitGame;


add:
img.png

Re: Problem setting conditions of function.

PostPosted: Mon Feb 10, 2014 6:15 pm
by DarkParadox
ExitGame is a function, you need to use:
Code: Select all
if (f_timer(5) == 0) ExitGame();

Re: Problem setting conditions of function.

PostPosted: Mon Feb 10, 2014 6:53 pm
by bat78
LOL misstype of brackets when picking from the list.
I was like "Thats fake error, my script have nothing to do with the error e-e" wasn't concentrated at something else but the function.
Thanks.