SA-MP Forums Archive
Errors - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Errors (/showthread.php?tid=654066)



Errors [REP+] - Filbert - 20.05.2018

PHP код:
    if(PlayerInfo[playerid][VIP] == 0)
    {
            new 
string[128]; GetPlayerName(playerid,string,sizeof(string)); stringbig[128]; //<<< Line 2160
            
format(stringbig,sizeof(stringbig),"{%06x}%s{FFFFFF}(%d): %s",GetPlayerColor(playerid) >>> 8,string,playeridtext);
            
SendClientMessageToAll(GetPlayerColor(playerid),stringbig);
            
format(stringbigsizeof(stringbig), "02[%d] 07%s: %s"playeridstringtext);
            
IRC_GroupSay(gGroupID,IRC_CHANNEL,stringbig);
            
format(stringbig,MAX_CHATBUBBLE_LENGTH,"Says: %s",text);
            
SetPlayerChatBubble(playerid,stringbig,MESSAGE_COLOR,35.0,10000);
            return 
0;
    }
    if(
PlayerInfo[playerid][VIP] >= 1)
    {
            new 
string[128]; GetPlayerName(playerid,string,sizeof(string)); stringbig[128];
            
format(stringbig,sizeof(stringbig),"{00FF00}[VIP]{%06x}%s{FFFFFF}(%d): %s",GetPlayerColor(playerid) >>> 8,string,playeridtext);
            
SendClientMessageToAll(GetPlayerColor(playerid),stringbig);
            
format(stringbigsizeof(stringbig), "02[%d] 07%s: %s"playeridstringtext);
            
IRC_GroupSay(gGroupID,IRC_CHANNEL,stringbig);
            
format(stringbig,MAX_CHATBUBBLE_LENGTH,"Says: %s",text);
            
SetPlayerChatBubble(playerid,stringbig,MESSAGE_COLOR,35.0,10000);
            return 
0;
    }
    if(
PlayerInfo[playerid][VIP] >= && PlayerInfo[playerid][Level] >= 6)
    {
            new 
string[128]; GetPlayerName(playerid,string,sizeof(string)); stringbig[128];
            
format(stringbig,sizeof(stringbig),"{00FF00}[VIP]{%06x}%s{FFFFFF}(%d): {FFFF00}%s",GetPlayerColor(playerid) >>> 8,string,playeridtext);
            
SendClientMessageToAll(GetPlayerColor(playerid),stringbig);
            
format(stringbigsizeof(stringbig), "02[%d] 07%s: %s"playeridstringtext);
            
IRC_GroupSay(gGroupID,IRC_CHANNEL,stringbig);
            
format(stringbig,MAX_CHATBUBBLE_LENGTH,"Says: %s",text);
            
SetPlayerChatBubble(playerid,stringbig,MESSAGE_COLOR,35.0,10000);
            return 
0;
    } 
Found

Код:
D:\SA-MP Servers\TestServer\Gamemodes\TestServer.pwn(71) : warning 201: redefinition of constant/macro (symbol "white1")
D:\SA-MP Servers\TestServer\Gamemodes\TestServer.pwn(2160) : error 017: undefined symbol "stringbig"
D:\SA-MP Servers\TestServer\Gamemodes\TestServer.pwn(2160) : warning 215: expression has no effect
D:\SA-MP Servers\TestServer\Gamemodes\TestServer.pwn(2160) : error 001: expected token: ";", but found "]"
D:\SA-MP Servers\TestServer\Gamemodes\TestServer.pwn(2160) : error 029: invalid expression, assumed zero
D:\SA-MP Servers\TestServer\Gamemodes\TestServer.pwn(2160) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
REP+ for help


Re: Errors [REP+] - Filbert - 20.05.2018

up up up up up


Re: Errors - DelK - 20.05.2018

PHP код:
    new string[128], stringbig[128];
    
GetPlayerName(playerid,string,sizeof(string)); 
Or if you prefer to save lines use:
PHP код:
new string[128], stringbig[128], GetPlayerName(playerid,string,sizeof(string)); 



Re: Errors - UFF - 20.05.2018

Use this

Код:
new string[24],
      stringbig[128];

GetPlayerName(playerid, string,sizeof(string));
instead of
Код:
new string[128]; GetPlayerName(playerid,string,sizeof(string)); stringbig[128]; //<<< Line 2160



Re: Errors - Filbert - 20.05.2018

Thanks DelK, REP+