Why can I not do this switch?
#1

pawn Код:
switch(idx)
{
                    case 0: file2 = fopen("CRP_Scriptfiles/Businesses/businesses.cfg", io_write);
                    else: fopen("CRP_Scriptfiles/Businesses/businesses.cfg", io_append);
}

I get these errors:

Quote:

(15862) : error 002: only a single statement (or expression) can follow each "case"
(15862) : error 029: invalid expression, assumed zero

Line 15862 is the "else:" line.

What is another way to do "else"..

I do not want to use the elseif, etc, I would like to use the switch system.
Reply


Messages In This Thread
Why can I not do this switch? - by Memoryz - 13.09.2010, 20:13
Re: Why can I not do this switch? - by [XST]O_x - 13.09.2010, 20:15
Re: Why can I not do this switch? - by Memoryz - 13.09.2010, 20:17

Forum Jump:


Users browsing this thread: 2 Guest(s)