Need to fix this errors
#1

Код:
D:\eGrp with Biz system\EGRP Fixed by Moustafa\EGRP.pwn(19523) : warning 213: tag mismatch
D:\eGrp with Biz system\EGRP Fixed by Moustafa\EGRP.pwn(19523) : warning 202: number of arguments does not match definition
D:\eGrp with Biz system\EGRP Fixed by Moustafa\EGRP.pwn(33424) : error 017: undefined symbol "foreach"
D:\eGrp with Biz system\EGRP Fixed by Moustafa\EGRP.pwn(33424) : error 029: invalid expression, assumed zero
D:\eGrp with Biz system\EGRP Fixed by Moustafa\EGRP.pwn(33424) : error 017: undefined symbol "Player"
D:\eGrp with Biz system\EGRP Fixed by Moustafa\EGRP.pwn(33424) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Код:
CMD:shopplate(playerid, params[])
{
    if(PlayerInfo[playerid][pShopTech])
	{
		new iVehType, iVehIndex, iTargetOwner, carid, orderid, plate[32];
        if(sscanf(params, "dds[32]", carid, orderid, plate))
		{
		    SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /shopplate [carid] [orderid] [plate/remove]");
		    SendClientMessageEx(playerid, COLOR_GREY, "COLORS: (black/white/blue/red/green/purple/yellow/lightblue/navy/beige/darkgreen/darkblue/darkgrey/gold/brown/darkbrown/darkred");
			SendClientMessageEx(playerid, COLOR_GREY, "/maroon/pink) USAGE: (red)Hi(white)how are you? NOTE: Each color counts for 8 characters");
			return 1;
		}

Line:33424		foreach(new i: Player)
		{
			iVehIndex = GetPlayerVehicle(i, carid);
			if(iVehIndex != -1)
			{
				iVehType = 1;
				iTargetOwner = i;
				break;
			}
		}
		if(iVehType == 1)
		{
		    format(plate, sizeof(plate), "%s", str_replace("(black)", "{000000}", plate));
		    format(plate, sizeof(plate), "%s", str_replace("(white)", "{FFFFFF}", plate));
		    format(plate, sizeof(plate), "%s", str_replace("(blue)", "{0000FF}", plate));
		    format(plate, sizeof(plate), "%s", str_replace("(red)", "{FF0000}", plate));
		    format(plate, sizeof(plate), "%s", str_replace("(green)", "{008000}", plate));
		    format(plate, sizeof(plate), "%s", str_replace("(purple)", "{800080}", plate));
		    format(plate, sizeof(plate), "%s", str_replace("(yellow)", "{FFFF00}", plate));
		    format(plate, sizeof(plate), "%s", str_replace("(lightblue)", "{ADD8E6}", plate));
		    format(plate, sizeof(plate), "%s", str_replace("(navy)", "{000080}", plate));
		    format(plate, sizeof(plate), "%s", str_replace("(beige)", "{F5F5DC}", plate));
		    format(plate, sizeof(plate), "%s", str_replace("(darkgreen)", "{006400}", plate));
		    format(plate, sizeof(plate), "%s", str_replace("(darkblue)", "{00008B}", plate));
		    format(plate, sizeof(plate), "%s", str_replace("(darkgrey)", "{A9A9A9}", plate));
		    format(plate, sizeof(plate), "%s", str_replace("(gold)", "{FFD700}", plate));
		    format(plate, sizeof(plate), "%s", str_replace("(brown)", "{A52A2A}", plate));
		    format(plate, sizeof(plate), "%s", str_replace("(darkbrown)", "{5C4033}", plate));
		    format(plate, sizeof(plate), "%s", str_replace("(darkred)", "{8B0000}", plate));

		    new string[128], Float:X, Float:Y, Float:Z;
		    GetVehiclePos(carid, X, Y, Z);
		    if(strcmp(plate, "remove", true) == 0)
		    {
		        PlayerVehicleInfo[iTargetOwner][iVehIndex][pvPlate] = 0;
		    }
		    else
		    {
				format(PlayerVehicleInfo[iTargetOwner][iVehIndex][pvPlate], 32, "%s", plate);
				SetVehicleToRespawn(carid);
				SetVehiclePos(carid, X, Y, Z);
			}

			g_mysql_SaveVehicle(iTargetOwner, iVehIndex);

			format(string, sizeof(string), "Plate set on %s (ID: %d) %s (ID: %d)", GetPlayerNameEx(iTargetOwner), iTargetOwner, GetVehicleName(carid), carid);
			SendClientMessage(playerid, COLOR_WHITE, string);
			format(string, sizeof(string), "(OrderID: %d) Plate: %s", orderid, plate);
			SendClientMessage(playerid, COLOR_WHITE, string);
			format(string, sizeof(string), "%s set %s %s (Slot %d) plate to %s (order %d)", GetPlayerNameEx(playerid), GetPlayerNameEx(iTargetOwner), GetVehicleName(carid), iVehIndex, plate, orderid);
			Log("logs/shoplog.log", string);
		}
		else
		{
		    SendClientMessageEx(playerid, COLOR_GRAD1, "This is not a player owned vehicle, you cannot give it a custom plate.");
		}
	}
	else
	{
		SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
	}
	return 1;
}
Reply
#2

Maybe replace that line 33424 with that :

Код:
foreach(Player, i)
Reply
#3

These guys downloading RP gamemodes and trying to solve these problems seems to be very common but unfortunately I doubt anyone will help with this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)