Getting errors
#1

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"
Reply
#2

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    }
Reply
#3

thanks no errors i hope it works tho
Reply
#4

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.
Reply
#5

oh right...dumb me,any ideas where i can add it then?its under onplayerconnect right now.
Reply
#6

Well you could put it where they log in. And say 'Donator blah blah has logged in' or something.
Reply
#7

Good idea :P thanks it works now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)