SA-MP Forums Archive
Help problem with errors fast rep+ - 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: Help problem with errors fast rep+ (/showthread.php?tid=575544)



Help problem with errors fast rep+ - Mijata - 27.05.2015

Код:
(13676) : error 028: invalid subscript (not an array or too many subscripts): "GetPlayerScore"
Код:
(13676) : error 001: expected token: ";", but found "]"
Код:
(13676) : error 029: invalid expression, assumed zero
Код:
(13676) : fatal error 107: too many error messages on one line
Код:
public OnPlayerRequestSpawn(playerid)
{
    if(pInfo[playerid][Registered] == 1 && pInfo[playerid][Logged] == 0)
    {
       SendClientMessage(playerid,red,"Error: You must be logged first!");
       return 0;
    }
    new team1 = GetPlayersInTeamFromMaxPlayers(C1);//team1 = how many players are in TEAM_ONE..
    new team2 = GetPlayersInTeamFromMaxPlayers(T1);//team2 = how many players are in TEAM_TWO..
    if(team1 > team2 && gTeam[playerid] == C1)//if team1 has more players than team2 and the player is trying to spawn as TEAM_ONE..
    {
        GameTextForPlayer(playerid, "~r~Team Full!~n~~w~Choose Another Team!", 3000, 5);//Tell them its full, choose another team..
        return 0;//And stop them from spawning..
    }
    else if(team2 > team1 && gTeam[playerid] == T1)//if team2 has more players than team1 and the player is trying to spawn as TEAM_TWO..
    {
        GameTextForPlayer(playerid, "~r~Team Full!~n~~w~Choose Another Team!", 3000, 5);//Tell them its full, choose another team..
        return 0;//And stop them from spawning..
    }
  LINE 13676----------------------- > if(gTeam[playerid] == MB & GetPlayerScore[playerid] <= 49);
	{
	SendClientMessage(playerid,COLOR_RED,"You need 50 score for it");
	return 0;
	}
    return 1;
	}



Re: Help with errors fast rep+ - Trucido - 27.05.2015

Код:
if(gTeam[playerid] == MB & GetPlayerScore[playerid] <= 49)



Re: Help with errors fast rep+ - Mijata - 27.05.2015

again same errors


Re: Help with errors fast rep+ - Trucido - 27.05.2015

Quote:
Originally Posted by Mijata
Посмотреть сообщение
again same errors
oh change & to &&


Re: Help problem with errors fast rep+ - Mijata - 27.05.2015

again 4 errors


Re: Help problem with errors fast rep+ - ChromeAmazing - 27.05.2015

pawn Код:
if(gTeam[playerid] == MB && GetPlayerScore[playerid] <= 49)
{
    SendClientMessage(playerid,COLOR_RED,"You need 50 score for it");
    return 0;
}



Re: Help problem with errors fast rep+ - Mijata - 27.05.2015

Quote:
Originally Posted by ChromeAmazing
Посмотреть сообщение
pawn Код:
if(gTeam[playerid] == MB && GetPlayerScore[playerid] <= 49)
{
    SendClientMessage(playerid,COLOR_RED,"You need 50 score for it");
    return 0;
}
pawn Код:
else if(team2 > team1 && gTeam[playerid] == T1)//if team2 has more players than team1 and the player is trying to spawn as TEAM_TWO..
    {
        GameTextForPlayer(playerid, "~r~Team Full!~n~~w~Choose Another Team!", 3000, 5);//Tell them its full, choose another team..
        return 0;//And stop them from spawning..
    }
    ------------->if(gTeam[playerid] == MB && GetPlayerScore[playerid] <= 49)
    {
    SendClientMessage(playerid,COLOR_RED,"You need 50 score for it");
    return 0;
    }
again 4 errors
maybe is problem new pawno?


Re: Help problem with errors fast rep+ - Trucido - 27.05.2015

Quote:
Originally Posted by Mijata
Посмотреть сообщение
pawn Код:
else if(team2 > team1 && gTeam[playerid] == T1)//if team2 has more players than team1 and the player is trying to spawn as TEAM_TWO..
    {
        GameTextForPlayer(playerid, "~r~Team Full!~n~~w~Choose Another Team!", 3000, 5);//Tell them its full, choose another team..
        return 0;//And stop them from spawning..
    }
    ------------->if(gTeam[playerid] == MB && GetPlayerScore[playerid] <= 49)
    {
    SendClientMessage(playerid,COLOR_RED,"You need 50 score for it");
    return 0;
    }
again 4 errors
maybe is problem new pawno?
Код:
        if(gTeam[playerid] == MB && GetPlayerScore(playerid) <= 49)
	{
	    SendClientMessage(playerid,COLOR_RED,"You need 50 score for it");
	    return 0;
	}



Re: Help problem with errors fast rep+ - Mijata - 27.05.2015

again errors ??


Re: Help problem with errors fast rep+ - Trucido - 27.05.2015

Quote:
Originally Posted by Mijata
Посмотреть сообщение
again errors ??
ur gteam[playerid] should look like PlayerInfo[playerid][gTeam] or some shit like that, but it isnt thats probably why.