PDA

View Full Version : need help with this


xMCx
10/11/2012, 07:04 PM
CMD:vips(playerid,params[])
{
if(IsPlayerConnected(playerid)){
SendClientMessage(playerid,lb,"|- Online VIP's -|");
for(new i = 0;i < MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[playerid][pVip] >= 1)
{
new vtext,sname[MAX_PLAYER_NAME],string[126];
if(PlayerInfo[i][pVip] == 3) { vtext = "Golden VIP"; }
else if(PlayerInfo[i][pVip] == 2) { vtext = "Silver VIP"; }
else if(PlayerInfo[i][pVip] == 1) { vtext = "Bronze VIP"; }
else { vtext = "VIP Level 1"; }
GetPlayerName(i,sname,sizeof(sname));
format(string,126,"'%s':[ %s ]",sname,vtext);
SendClientMessage(playerid,lb, string);
else
{
SendClientMessage(playerid,grey,"No VIP Online");
}
}
}
}
}
return 1;
}
Errors:
C:\Documents and Settings\User\Desktop\SAMP\gamemodes\mcdm.pwn(3440 ) : error 006: must be assigned to an array
C:\Documents and Settings\User\Desktop\SAMP\gamemodes\mcdm.pwn(3441 ) : error 006: must be assigned to an array
C:\Documents and Settings\User\Desktop\SAMP\gamemodes\mcdm.pwn(3442 ) : error 006: must be assigned to an array
C:\Documents and Settings\User\Desktop\SAMP\gamemodes\mcdm.pwn(3443 ) : error 006: must be assigned to an array
C:\Documents and Settings\User\Desktop\SAMP\gamemodes\mcdm.pwn(3447 ) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.

Mustafa6155
10/11/2012, 07:23 PM
what are the lines 3440 to 3447

xMCx
10/11/2012, 07:49 PM
what are the lines 3440 to 3447
if(PlayerInfo[i][pVip] == 3) { vtext = "Golden VIP"; }
else if(PlayerInfo[i][pVip] == 2) { vtext = "Silver VIP"; }
else if(PlayerInfo[i][pVip] == 1) { vtext = "Bronze VIP"; }
else { vtext = "VIP Level 1"; }
GetPlayerName(i,sname,sizeof(sname));
format(string,126,"'%s':[ %s ]",sname,vtext);
SendClientMessage(playerid,lb, string);
else

SuperViper
10/11/2012, 08:21 PM
vtext needs to be a string.