Invalid/unsupported p-code file format
#1

I am not sure what happened, but this is the modification I made on the script recently.

Код:
if(dialogid == DIALOG_RIMMOD2)
	{
		 if(response)
	    {
            new vehicleid = GetPlayerVehicleID(playerid);
	        if(PlayerInfo[playerid][pRimMod] == 0)
	            return SendClientMessageEx(playerid, COLOR_GREY, "You don't have modification kits.");

			if(InvalidModCheck(GetVehicleModel(GetPlayerVehicleID(playerid)), 1025))
			{
                
					if(IsPlayerInVehicle(playerid, vehicleid))
					{
						new string[128];
						format(string, sizeof(string), "%s modded his vehicle with rims %d", GetPlayerNameEx(playerid), GetPVarInt(playerid, "RimMod"));
						Log("logs/rimkit.log", string);
						SendClientMessage(playerid, COLOR_GREEN, "You have made the modification.");
						PlayerInfo[playerid][pRimMod]--;

						AddVehicleComponent(GetPlayerVehicleID(playerid), GetPVarInt(playerid, "RimMod"));
						DeletePVar(playerid, "RimMod");
	        			UpdatePlayerVehicleMods(playerid, vehicleid);
						return 1;
					}
				SendClientMessage(playerid, COLOR_GREY, "You're not in your vehicle.");
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "This can't be modded.");
			}
	    }
	}
}

	if(dialogid == DIALOG_RIMMOD)
	{
	    if(response)
	    {
	        new szRims[24];
			switch(listitem)
			{
				case 0: SetPVarInt(playerid, "RimMod", 1025), szRims = "Offroad";
				case 1: SetPVarInt(playerid, "RimMod", 1073), szRims = "Shadow";
				case 2: SetPVarInt(playerid, "RimMod", 1074), szRims = "Mega";
				case 3: SetPVarInt(playerid, "RimMod", 1075), szRims = "Rimshine";
				case 4: SetPVarInt(playerid, "RimMod", 1076), szRims = "Wires";
				case 5: SetPVarInt(playerid, "RimMod", 1077), szRims = "Classic";
				case 6: SetPVarInt(playerid, "RimMod", 1078), szRims = "Twist";
				case 7: SetPVarInt(playerid, "RimMod", 1079), szRims = "Cutter";
				case 8: SetPVarInt(playerid, "RimMod", 1080), szRims = "Switch";
				case 9: SetPVarInt(playerid, "RimMod", 1081), szRims = "Grove";
				case 10: SetPVarInt(playerid, "RimMod", 1082), szRims = "Import";
				case 11: SetPVarInt(playerid, "RimMod", 1083), szRims = "Dollar";
				case 12: SetPVarInt(playerid, "RimMod", 1084), szRims = "Trance";
				case 13: SetPVarInt(playerid, "RimMod", 1085), szRims = "Atomic";
				case 14: SetPVarInt(playerid, "RimMod", 1096), szRims = "Ahab";
				case 15: SetPVarInt(playerid, "RimMod", 1097), szRims = "Virtual";
				case 16: SetPVarInt(playerid, "RimMod", 1098), szRims = "Access";
  			}
  			new szMessage[128];
  			format(szMessage, 128, "You are about to place %s rims on this vehicle.", szRims);
			ShowPlayerDialog(playerid, DIALOG_RIMMOD2, DIALOG_STYLE_MSGBOX, "Confirm Rims", szMessage, "Confirm", "Deny");
	    }
	}
	if(dialogid == DIALOG_RIMMOD2)
	{
	    if(response)
	    {
	        new vehicleid = GetPlayerVehicleID(playerid);
	        if(PlayerInfo[playerid][pRimMod] == 0)
	            return SendClientMessage(playerid, COLOR_GREY, "You don't have modification kits.");

			if(InvalidModCheck(GetVehicleModel(GetPlayerVehicleID(playerid)), 1025))
			{
                
					if(IsPlayerInVehicle(playerid, vehicleid))
					{
						new string[128];
						format(string, sizeof(string), "%s moded his vehicle with rims %d", GetPlayerNameEx(playerid), GetPVarInt(playerid, "RimMod"));
						Log("logs/rimkit.log", string);
						SendClientMessage(playerid, COLOR_GREEN, "You have made the modification.");
						PlayerInfo[playerid][pRimMod]--;

						AddVehicleComponent(GetPlayerVehicleID(playerid), GetPVarInt(playerid, "RimMod"));
						DeletePVar(playerid, "RimMod");
	        			UpdatePlayerVehicleMods(playerid, vehicleid);
						return 1;
					}
				SendClientMessage(playerid, COLOR_GREY, "You're not in your vehicle.");
			}
			else
			{
  			  SendClientMessage(playerid, COLOR_GREY, "This can't be modded.");
			}
     	}
	}
Reply
#2

What is the problem? Can you elabore the question?
Reply
#3

Well, I can't compile the script after making this dialog, so when I start samp server It gave me this "Invalid/unsupported p-code file format" So I am asking for solution to solve this error. Did I do something wrong or what?

EDIT: Pawno crashed upon compile...
Reply
#4

It's probably due to a corrupt file, as i said on the other topic.
https://sampforum.blast.hk/showthread.php?tid=557576

EDIT: Looks like you found out, didn't see your edit.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)