05.04.2014, 02:22
What I want to do is create my /hbadge to a string so that I can place the values in it.
BOOSH! Warning.
pawn Код:
CMD:hbadge(playerid, params[])
{
if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
{
if(IsPlayerConnected(playerid))
{
if(isnull(params)) {
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /hbadge [factionid]");
SendClientMessageEx(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "|1 %s |2 %s |3 %s |4 %s |5 %s", faction1name, faction2name, faction3name, faction4name, faction5name);
SendClientMessageEx(playerid, COLOR_GRAD3, string);
format(string, sizeof(string), "|6 %s |7 %s |8 %s |9 %s", faction6name, faction7name, faction8name, faction9name);
SendClientMessageEx(playerid, COLOR_GRAD2, string);
format(string, sizeof(string), "|10 %s |11 %s |12 %s", faction10name, faction11name, faction12name);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), "|13 %s | 0 Badge off", faction13name);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
return 1;
}
if(strcmp(params,"1",true) == 0)
{
SetPlayerColor(playerid, faction1badge);
format(string, sizeof(string), "You've put your fake %s badge on", faction1name);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
}
else if(strcmp(params,"2",true) == 0)
{
SetPlayerColor(playerid, faction2badge);
format(string, sizeof(string), "You've put your fake %s badge on", faction2name);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
}
else if(strcmp(params,"3",true) == 0)
{
SetPlayerColor(playerid, faction3badge);
format(string, sizeof(string), "You've put your fake %s badge on", faction3name);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
}
else if(strcmp(params,"4",true) == 0)
{
SetPlayerColor(playerid, faction4badge);
format(string, sizeof(string), "You've put your fake %s badge on", faction4name);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
}
else if(strcmp(params,"5",true) == 0)
{
SetPlayerColor(playerid, faction5badge);
format(string, sizeof(string), "You've put your fake %s badge on", faction5name);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
}
else if(strcmp(params,"6",true) == 0)
{
SetPlayerColor(playerid, faction6badge);
format(string, sizeof(string), "You've put your fake %s badge on", faction6name);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
}
else if(strcmp(params,"7",true) == 0)
{
SetPlayerColor(playerid, faction7badge);
format(string, sizeof(string), "You've put your fake %s badge on", faction7name);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
}
else if(strcmp(params,"9",true) == 0)
{
SetPlayerColor(playerid, faction9badge);
format(string, sizeof(string), "You've put your fake %s badge on", faction9name);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
}
else if(strcmp(params,"10",true) == 0)
{
SetPlayerColor(playerid, faction10badge);
format(string, sizeof(string), "You've put your fake %s badge on", faction10name);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
}
else if(strcmp(params,"11",true) == 0)
{
SetPlayerColor(playerid, faction11badge);
format(string, sizeof(string), "You've put your fake %s badge on", faction11name);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
}
else if(strcmp(params,"12",true) == 0)
{
SetPlayerColor(playerid, faction12badge);
format(string, sizeof(string), "You've put your fake %s badge on", faction12name);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
}
else if(strcmp(params,"13",true) == 0)
{
SetPlayerColor(playerid,COLOR_NOOSE);
SendClientMessageEx(playerid, COLOR_WHITE, "Badge on.");
}
else if(strcmp(params,"0",true) == 0)
{
SetPlayerColor(playerid,TEAM_HIT_COLOR);
SendClientMessageEx(playerid, COLOR_WHITE, "You're badge has been removed");
}
}
}
return 1;
}
Код:
C:\Users\Randy\Desktop\Jacob's Server (Mine)\gamemodes\KG.pwn(34105) : error 017: undefined symbol "string" C:\Users\Randy\Desktop\Jacob's Server (Mine)\gamemodes\KG.pwn(34106) : error 017: undefined symbol "string" C:\Users\Randy\Desktop\Jacob's Server (Mine)\gamemodes\KG.pwn(34106) : error 017: undefined symbol "string" C:\Users\Randy\Desktop\Jacob's Server (Mine)\gamemodes\KG.pwn(34106) : error 029: invalid expression, assumed zero C:\Users\Randy\Desktop\Jacob's Server (Mine)\gamemodes\KG.pwn(34106) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.