PAWN CRASH
#1

When i add SendClientMessageToAll(-1, string); , like this:
pawn Код:
new
        string[64],
        name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,MAX_PLAYER_NAME);
    switch(reason)
    {
        case 0: format(string, sizeof string, "{FFFFFF}%s {CCCCCC}has left the server. .:{FFFFFF}(Timeout){CCCCCC}:.", name);
        case 1: format(string, sizeof string, "{FFFFFF}%s {CCCCCC}has left the server. .:{FFFFFF}(Leaving){CCCCCC}:.", name);
        case 2: format(string, sizeof string, "{FFFFFF}%s {CCCCCC}has left the server. .:{FFFFFF}(Kicked/Banned){CCCCCC}:.", name);
        SendClientMessageToAll(-1, string);
    }
Pawn can't compile and crashes o.o help me pls
Reply
#2

PHP код:
new
        
string[64],
        
name[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
    switch(
reason)
    {
        case 
0format(stringsizeof string"{FFFFFF}%s {CCCCCC}has left the server. .:{FFFFFF}(Timeout){CCCCCC}:."name);
        case 
1format(stringsizeof string"{FFFFFF}%s {CCCCCC}has left the server. .:{FFFFFF}(Leaving){CCCCCC}:."name);
        case 
2format(stringsizeof string"{FFFFFF}%s {CCCCCC}has left the server. .:{FFFFFF}(Kicked/Banned){CCCCCC}:."name);
    }
    
SendClientMessageToAll(-1string); 
Reply
#3

Add the SendClientMessageToAll outside of the "switch(reason)".

pawn Код:
new
        string[64],
        name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,MAX_PLAYER_NAME);
    switch(reason)
    {
        case 0: format(string, sizeof string, "{FFFFFF}%s {CCCCCC}has left the server. .:{FFFFFF}(Timeout){CCCCCC}:.", name);
        case 1: format(string, sizeof string, "{FFFFFF}%s {CCCCCC}has left the server. .:{FFFFFF}(Leaving){CCCCCC}:.", name);
        case 2: format(string, sizeof string, "{FFFFFF}%s {CCCCCC}has left the server. .:{FFFFFF}(Kicked/Banned){CCCCCC}:.", name);
       
    }
    SendClientMessageToAll(-1, string);
Reply
#4

aww, thnx guys
Reply
#5

It's abit akward that your PAWNO didin't give you an error. Better reinstall Pawno.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)