[Question] WTF is wrong?
#1

if(strcmp(cmd, "/MAXPING", true) == 0) // Set's MaxPing.
{
tmp = strtok(cmdtext, idx);
new MaxPing = strval(tmp);
if(!strlen(tmp)) return SCM(playerid, WHITE, "USAGE: /MAXPING [Ping]");
new ServerInfo[Ping] = MaxPing;
new Name[MAX_PLAYER_NAME], string[256];
GetPlayerName(playerid, Name, sizeof (Name));
format(string,sizeof (string), ".%d щйрд аъ очсйоен дфйрв м %s дагойп", MaxPing, Name);
SCMALL(WHITEBLUE, string);
return 1;
}

(SCM = sendclientmessage , SCMALL = sendclientmessagetoall)


the errors are:

E:\PROGRA~1\GTASAN~1\GAMEMO~1\Untitled.pwn(1533) : warning 219: local variable "ServerInfo" shadows a variable at a preceding level
E:\PROGRA~1\GTASAN~1\GAMEMO~1\Untitled.pwn(1533) : error 008: must be a constant expression; assumed zero
E:\PROGRA~1\GTASAN~1\GAMEMO~1\Untitled.pwn(1533) : error 036: empty statement
E:\PROGRA~1\GTASAN~1\GAMEMO~1\Untitled.pwn(2560) : warning 235: public function lacks forward declaration (symbol "AutomaticMassage")
E:\PROGRA~1\GTASAN~1\GAMEMO~1\Untitled.pwn(2594) : warning 203: symbol is never used: "ServerInfo"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.


on the line:
new ServerInfo[Ping] = MaxPing;
Reply
#2

Show us the full script. But to fix the ServerInfo error, change ServerInfo to ServerData.
Reply
#3

ServerInfo already exists once, for the beginning.
Reply
#4

u must show ur script!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)