Getting 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Getting errors (
/showthread.php?tid=118074)
Getting errors -
WardenCS - 02.01.2010
Hey,i have some lines and some problems with it
the lines:
pawn Код:
3711 {
3710 if(PlayerInfo[playerid][pDonateRank] != 0)
3711 }
3712 new pName[MAX_PLAYER_NAME];
3713 new string[48];
3714 GetPlayerName(playerid, pName, sizeof(pName));
3715 format(string, sizeof(string), "Donator %s Joined the server. (Joined)", pName);
3716 SendClientMessageToAll(0x9ACD32AA, string);
3717 }
3718 else if(PlayerInfo[playerid][pDonateRank] == 1)
3719 {
3720 new pName[MAX_PLAYER_NAME];
3721 new string[48];
3722 GetPlayerName(playerid, pName, sizeof(pName));
3723 format(string, sizeof(string), " %s Joined the server. (Joined)", pName);
3724 SendClientMessageToAll(0x9ACD32AA, string);
3725 }
and the errors
pawn Код:
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\mrp.pwn(3711) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\mrp.pwn(3711 -- 3712) : warning 215: expression has no effect
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\mrp.pwn(3718) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\mrp.pwn(3718) : warning 215: expression has no effect
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\mrp.pwn(3718) : error 001: expected token: ";", but found "if"
Re: Getting errors -
Backwardsman97 - 03.01.2010
Try this.
pawn Код:
3711 {
3710 if(PlayerInfo[playerid][pDonateRank] != 0)
3711 {//<=====
3712 new pName[MAX_PLAYER_NAME];
3713 new string[48];
3714 GetPlayerName(playerid, pName, sizeof(pName));
3715 format(string, sizeof(string), "Donator %s Joined the server. (Joined)", pName);
3716 SendClientMessageToAll(0x9ACD32AA, string);
3717 }
3718 else//And there was no need for the else if, just an else will do
3719 {
3720 new pName[MAX_PLAYER_NAME];
3721 new string[48];
3722 GetPlayerName(playerid, pName, sizeof(pName));
3723 format(string, sizeof(string), " %s Joined the server. (Joined)", pName);
3724 SendClientMessageToAll(0x9ACD32AA, string);
3725 }
Re: Getting errors -
WardenCS - 03.01.2010
thanks no errors

i hope it works tho
Re: Getting errors -
shady91 - 03.01.2010
how would it know if a player's a donator with out loading the players data so it would have to log them in and load there account as soon as they connect for it to work.
Re: Getting errors -
WardenCS - 03.01.2010
oh right...dumb me,any ideas where i can add it then?its under onplayerconnect right now.
Re: Getting errors -
Backwardsman97 - 03.01.2010
Well you could put it where they log in. And say 'Donator blah blah has logged in' or something.
Re: Getting errors -
WardenCS - 03.01.2010
Good idea :P thanks it works now