[AJUDA] Erro ao compilar (/pagarmulta)
#1

Quando vou compilar aparece:
warning: 235: public function lacks forward declaration (symbol "GetPlayerGP")
error: 004: function "PlayerToPoint" is not implemented
error: 030: compound statement not closed at the end of file (started at line 116)

Код:
forward GivePlayerGP(playerid, gp);
new Multa[MAX_PLAYERS];
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
new GP[MAX_PLAYERS];
 new multatimer;
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_YELLOW2 0xF5DEB3AA
#define COLOR_OOC 0xB1C8FBAA
forward DetranCheck();
new MoneyMessage[MAX_PLAYERS];
forward GameModeExitFunc();
forward settime(playerid);
new gPlayerCheckpointStatus[MAX_PLAYERS];
forward GameModeInitExitFunc();


public GetPlayerGP(playerid)
{
	return GP[playerid];
}
public GivePlayerGP(playerid, gp)
{
	GP[playerid] += gp;
	return 1;
}
public DetranCheck()
{
    new string[256];
    for(new j = 0; j < MAX_PLAYERS; j++)
	{
        if(Multa[j] > 1)
		{
             SendClientMessage(j, COLOR_OOC, "Vocк estб devendo o DETRAN, vocк deve pagar suas multas atй o prуximo pagamento para nгo ser preso.");
		}

		if(GetPlayerGP(j) < 0)
		{
		    if(MoneyMessage[j]==0)
		    {
			    format(string, sizeof(string), "Vocк estб em dнvida, vocк deve recuperar o dinheiro perdido atй o prуximo pagamento para nгo ser preso.", GetPlayerGP(j));
				SendClientMessage(j, COLOR_OOC, string);
				MoneyMessage[j] = 1;
			}
		}
		else
		{
		    MoneyMessage[j] = 0;
		}
	}
}
public GameModeExitFunc()
{

	KillTimer(multatimer);
	GameModeExit();
}

public OnGameModeInit()  {
 multatimer = SetTimer("DetranCheck", 180000, 1);
}

strtok(const string[], &index)
{
	new length = strlen(string);
	while ((index < length) && (string[index] <= ' '))
	{
		index++;
	}

	new offset = index;
	new result[20];
	while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = string[index];
		index++;
	}
	result[index - offset] = EOS;
	return result;
}

 public OnPlayerCommandText(playerid, cmdtext[])
{
	new string[256];
	new playermoney;
	new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
	new playername[MAX_PLAYER_NAME];
	new cmd[256];
	new tmp[256];
	new giveplayerid, moneys, idx;
	cmd = strtok(cmdtext, idx);

 	if(strcmp(cmd, "/pagarmulta", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(!PlayerToPoint(4.0, playerid, 249.56, 67.87, 1003.64))
			{
	    		SendClientMessage(playerid, COLOR_GREY, "Vocк precisa estar no balcгo da DP para pagar uma multa!");
	    		return 1;
			}
			else
			{
				if(Multa[playerid] == 0)
				{
		 		   SendClientMessage(playerid, COLOR_YELLOW, "Vocк nгo tem uma multa pra pagar!");
		 		   return 1;
  				}
  				else if(Multa[playerid] == 1)
  				{
  					SendClientMessage(playerid, COLOR_YELLOW, "Vocк pagou 1 multa no valor de R$100.");
	 				Multa[playerid] -= 1;
	 				GivePlayerGP(playerid, -100);
				}
				else if(Multa[playerid] == 2)
  				{
  					SendClientMessage(playerid, COLOR_YELLOW, "Vocк pagou 2 multas no valor de R$200.");
	 				Multa[playerid] = 0;
	 				GivePlayerGP(playerid, -200);
				}
				else if(Multa[playerid] == 3)
  				{
  					SendClientMessage(playerid, COLOR_YELLOW, "Vocк pagou 3 multas no valor de R$300.");
	 				Multa[playerid] = 0;
	 				GivePlayerGP(playerid, -300);
				}
				else if(Multa[playerid] == 4)
  				{
  					SendClientMessage(playerid, COLOR_YELLOW, "Vocк pagou 4 multas no valor de R$400.");
	 				Multa[playerid] = 0;
	 				GivePlayerGP(playerid, -400);
				}
				else if(Multa[playerid] == 5)
  				{
  					SendClientMessage(playerid, COLOR_YELLOW, "Vocк pagou 5 multas no valor de R$500.");
	 				Multa[playerid] = 0;
	 				GivePlayerGP(playerid, -500);
				}
Reply


Messages In This Thread
[AJUDA] Erro ao compilar (/pagarmulta) - by Bielz - 21.05.2011, 03:23
Re: [AJUDA] Erro ao compilar (/pagarmulta) - by ViniBorn - 21.05.2011, 04:05
Re: [AJUDA] Erro ao compilar (/pagarmulta) - by Shadoww5 - 21.05.2011, 11:56
Re: [AJUDA] Erro ao compilar (/pagarmulta) - by deregudegu - 21.05.2011, 19:36
Re: [AJUDA] Erro ao compilar (/pagarmulta) - by Shadoww5 - 21.05.2011, 19:45
Re: [AJUDA] Erro ao compilar (/pagarmulta) - by Bielz - 21.05.2011, 20:37
Re: [AJUDA] Erro ao compilar (/pagarmulta) - by Shadoww5 - 21.05.2011, 20:45
Re: [AJUDA] Erro ao compilar (/pagarmulta) - by Bielz - 21.05.2011, 20:49
Re: [AJUDA] Erro ao compilar (/pagarmulta) - by Shadoww5 - 21.05.2011, 20:50
Re: [AJUDA] Erro ao compilar (/pagarmulta) - by Bielz - 21.05.2011, 20:58

Forum Jump:


Users browsing this thread: 1 Guest(s)