4 errors and a few warnings
#1

Hello guys am having a issue adding AVS vehicle system you can find that on the filterscripts.

anyways am trying to add it to my gamemode it wont happen keep getting errors logs below.


Код:
C:\Users\Brandon\Desktop\Roleplay\gamemodes\RP.pwn(44) : warning 201: redefinition of constant/macro (symbol "MAX_PLAYER_VEHICLES")
C:\Users\Brandon\Desktop\Roleplay\gamemodes\RP.pwn(140) : warning 201: redefinition of constant/macro (symbol "CMD:%1(%2)")
C:\Users\Brandon\Desktop\Roleplay\gamemodes\RP.pwn(510) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\Brandon\Desktop\Roleplay\gamemodes\RP.pwn(511) : error 035: argument type mismatch (argument 2)
C:\Users\Brandon\Desktop\Roleplay\gamemodes\RP.pwn(510) : warning 204: symbol is assigned a value that is never used: "pName"
C:\Users\Brandon\Desktop\Roleplay\gamemodes\RP.pwn(840) : error 035: argument type mismatch (argument 2)
C:\Users\Brandon\Desktop\Roleplay\gamemodes\RP.pwn(1055) : warning 202: number of arguments does not match definition
C:\Users\Brandon\Desktop\Roleplay\gamemodes\RP.pwn(1055) : warning 202: number of arguments does not match definition
C:\Users\Brandon\Desktop\Roleplay\gamemodes\RP.pwn(1055) : error 035: argument type mismatch (argument 2)
C:\Users\Brandon\Desktop\Roleplay\gamemodes\RP.pwn(1055) : error 035: argument type mismatch (argument 2)
C:\Users\Brandon\Desktop\Roleplay\gamemodes\RP.pwn(6624) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
C:\Users\Brandon\Desktop\Roleplay\gamemodes\RP.pwn(8488) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.


error line 511
Код:
stock PlayerName(playerid)
{
	new pName[MAX_PLAYER_NAME];
	GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
	return pName;
}
Error line 840
Код:
GetPlayerVehicleAccess(playerid, vehicleid)
{
	if(IsValidVehicle(vehicleid))
	{
		if(VehicleCreated[vehicleid] == VEHICLE_DEALERSHIP)
		{
			if(IsAdmin(playerid, 1))
			{
				return 1;
			}
		}
		else if(VehicleCreated[vehicleid] == VEHICLE_PLAYER)
		{
			if(strcmp(VehicleOwner[vehicleid], PlayerName(playerid)) == 0)
			{
				return 2;
			}
			else if(GetPVarInt(playerid, "CarKeys") == vehicleid)
			{
				return 1;
			}
		}
	}
	else
	{
		return 1;
	}
	return 0;
}
Error line 1055
Код:
public Speedometer()
{
	new vehicleid, Float:health;
	new engine, lights, alarm, doors, bonnet, boot, objective;
	new fstring[32], string[512];

	for(new i=0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
		{
			vehicleid = GetPlayerVehicleID(i);
			GetVehicleHealth(vehicleid, health);
			GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);

			string = "~b~~h~vehicle: ~w~";
			strcat(string, VehicleNames[GetVehicleModel(vehicleid)-400], sizeof(string));

			strcat(string, "~n~~b~~h~gps: ~w~", sizeof(string));
			strcat(string, GetPlayer3DZone(i), sizeof(string));

			strcat(string, "~n~~b~~h~health: ~g~", sizeof(string));
			fstring = "iiiiiiiiii";
			if(health > 1000.0) strins(fstring, "~r~", 10, sizeof(fstring));
			else if(health < 0.0) strins(fstring, "~r~", 0, sizeof(fstring));
			else strins(fstring, "~r~", floatround(health/100.0), sizeof(fstring));
			strcat(string, fstring, sizeof(string));

			strcat(string, "        ~b~~h~fuel: ~g~", sizeof(string));
			fstring = "iiiiiiiiii";
			if(Fuel[vehicleid] > 100.0) strins(fstring, "~r~", 10, sizeof(fstring));
			else if(Fuel[vehicleid] < 0.0) strins(fstring, "~r~", 0, sizeof(fstring));
			else strins(fstring, "~r~", floatround(Fuel[vehicleid]/10.0), sizeof(fstring));
			strcat(string, fstring, sizeof(string));

			strcat(string, "        ~b~~h~", sizeof(string));
			if(GetPVarInt(i, "Speedo")) format(fstring,sizeof(fstring),"mph: ~w~%d", GetPlayerSpeed(i, false));
			else format(fstring,sizeof(fstring),"kph: ~w~%d", GetPlayerSpeed(i, true));
			strcat(string, fstring, sizeof(string));

			strcat(string, "~n~~b~~h~engine: ", sizeof(string));
			if(engine == 1) strcat(string, "~g~on", sizeof(string));
			else strcat(string, "~r~off", sizeof(string));

			strcat(string, "        ~b~~h~alarm: ", sizeof(string));
			if(VehicleSecurity[vehicleid] == 1) strcat(string, "~g~on", sizeof(string));
			else strcat(string, "~r~off", sizeof(string));

			strcat(string, "        ~b~~h~doors: ", sizeof(string));
			if(doors == 1) strcat(string, "~r~locked", sizeof(string));
			else strcat(string, "~g~unlocked", sizeof(string));

			TextDrawSetString(SpeedoText[i], string);
		}
	}
}
Reply


Messages In This Thread
4 errors and a few warnings - by OpticKiller - 03.06.2013, 04:14
Re: 4 errors and a few warnings - by Captive - 03.06.2013, 04:22
Re: 4 errors and a few warnings - by OpticKiller - 03.06.2013, 05:58
Respuesta: 4 errors and a few warnings - by JustBored - 03.06.2013, 06:12
Re: Respuesta: 4 errors and a few warnings - by OpticKiller - 03.06.2013, 06:14
Re: 4 errors and a few warnings - by BossZk - 03.06.2013, 13:41
Re: 4 errors and a few warnings - by OpticKiller - 04.06.2013, 17:07
Re: 4 errors and a few warnings - by NvidiaForTheWin - 04.06.2013, 17:24
Re: 4 errors and a few warnings - by FunnyBear - 04.06.2013, 17:27
Re: 4 errors and a few warnings - by OpticKiller - 04.06.2013, 17:49

Forum Jump:


Users browsing this thread: 1 Guest(s)