a lot of error messages - 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: a lot of error messages (
/showthread.php?tid=339771)
a lot of error messages -
stormchaser206 - 04.05.2012
Heres the parts thats causing errors:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo[killerid][pKills]++;
PlayerInfo[playerid][pDeaths]++;
PlayerInfo[playerid][pScore] + 2;
ServerInfo[sKills]++;
ServerInfo[sDeaths]++;
return 1;
}
And heres the errors:
Код:
C:\Users\Keegan\Desktop\filterscripts\WWAdmin.pwn(193) : warning 215: expression has no effect
C:\Users\Keegan\Desktop\filterscripts\WWAdmin.pwn(195) : error 028: invalid subscript (not an array or too many subscripts): "ServerInfo"
C:\Users\Keegan\Desktop\filterscripts\WWAdmin.pwn(195) : warning 215: expression has no effect
C:\Users\Keegan\Desktop\filterscripts\WWAdmin.pwn(195) : error 001: expected token: ";", but found "]"
C:\Users\Keegan\Desktop\filterscripts\WWAdmin.pwn(195) : error 029: invalid expression, assumed zero
C:\Users\Keegan\Desktop\filterscripts\WWAdmin.pwn(195) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Please help.
Re: a lot of error messages -
TzAkS. - 04.05.2012
How you created ServerInfo?
And these
Код:
PlayerInfo[playerid][pScore] + 2;
should be
Код:
PlayerInfo[playerid][pScore] += 2;
Re: a lot of error messages -
stormchaser206 - 04.05.2012
yes, i can show you the array:
pawn Код:
enum ServerInfo
{
sPlayers,
sBans,
sKicks,
sWarns,
sMutes,
sKills,
sDeaths
}
Respuesta: a lot of error messages -
Chris1337 - 04.05.2012
pawn Код:
ServerInfo[SKills]++;
ServerInfo[SDeaths]++;
And Make sure you have this
pawn Код:
enum ServerInfo
{
SKills,
SDeaths
}
and have you?
#define ServerInfo /path?
Re: a lot of error messages -
TzAkS. - 04.05.2012
Try
Код:
enum SInfo
{
sPlayers,
sBans,
sKicks,
sWarns,
sMutes,
sKills,
sDeaths
}
new ServerInfo[MAX_PLAYERS][SInfo];
Код:
ServerInfo[playerid][sKills]++;
ServerInfo[playerid][sDeaths]++;
Re: a lot of error messages -
stormchaser206 - 04.05.2012
Thanks guys

rep+ to both