07.04.2011, 10:14
I copied this code from another mode:
But when I put it on my server,I get those errors:
What is wrong?
PHP код:
for(new i=0;i<MAX_PLAYERS;i++)
{
switch(reason)
{
case 0; {
format(String, sizeof(String), "%s has left the server. (Crash)", playername);
SendClientMessage(i,COLOR_JGREY, String); }
case 1; {
format(String, sizeof(String), "%s has left the server. (Leaving)", playername);
SendClientMessage(i,COLOR_JGREY, String); }
case 2; {
format(String, sizeof(String), "%s has left the server. (Kicked/Banned)", playername);
SendClientMessage(i,COLOR_JGREY, String); }
} }
PHP код:
C:\Documents and Settings\XXX\XXX\XXX\XXX\XXX.pwn(984) : error 001: expected token: ":", but found ";"
C:\Documents and Settings\XXX\XXX\XXX\XXX\XXX.pwn(984) : error 036: empty statement
C:\Documents and Settings\XXX\XXX\XXX\XXX\XXX.pwn(987) : error 014: invalid statement; not in switch
C:\Documents and Settings\XXX\XXX\XXX\XXX\XXX.pwn(987) : warning 215: expression has no effect
C:\Documents and Settings\XXX\XXX\XXX\XXX\XXX.pwn(989) : error 017: undefined symbol "i"
C:\Documents and Settings\XXX\XXX\XXX\XXX\XXX.pwn(990) : error 014: invalid statement; not in switch
C:\Documents and Settings\XXX\XXX\XXX\XXX\XXX.pwn(990) : warning 215: expression has no effect
C:\Documents and Settings\XXX\XXX\XXX\XXX\XXX.pwn(992) : error 017: undefined symbol "i"
C:\Documents and Settings\XXX\XXX\XXX\XXX\XXX.pwn(993) : error 054: unmatched closing brace ("}")
C:\Documents and Settings\XXX\XXX\XXX\XXX\XXX.pwn(995) : error 010: invalid function or declaration