SA-MP Forums Archive
4 Errors - 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: 4 Errors (/showthread.php?tid=482232)



4 Errors - Tuntun - 20.12.2013

Код:
E:\Servert\scripts\pawno\include\PPC_PlayerCommands.inc(763) : error 017: undefined symbol "Your"
E:\Servert\scripts\pawno\include\PPC_PlayerCommands.inc(763) : error 017: undefined symbol "vehicle"
E:\Servert\scripts\pawno\include\PPC_PlayerCommands.inc(763) : error 017: undefined symbol "has"
E:\Servert\scripts\pawno\include\PPC_PlayerCommands.inc(763) : fatal error 107: too many error messages on one line

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


4 Errors.
Lines:
pawn Код:
SendClientMessage(playerid, 0x00FF00FF, "{FFFF00}Your vehicle has been successfully repaired!");
Bull line:
Код:
COMMAND:repair(playerid, params[])
{
	// Send the command to all admins so they can see it
	SendAdminText(playerid, "/repair", params);

	// Check if the player has logged in
	if (APlayerData[playerid][LoggedIn] == true)
	{
		// Check if the player's admin-level is at least 1
		if (APlayerData[playerid][PlayerLevel] >= 1)
		{
		    // Check if the player is inside a vehicle
			if(!IsPlayerInAnyVehicle(playerid))
				return SendClientMessage(playerid, 0xFF0000FF, "You are not in a vehicle!"); // Let the player know he's not inside a vehicle and let the server know that this was a valid command
			// Fully repair the vehicle (damage value and bodywork)
			RepairVehicle(GetPlayerVehicleID(playerid));
			// Send the player a message to inform him that his vehicle has been repaired
			SendClientMessage(playerid, 0x00FF00FF, "{FFFF00}Your vehicle has been successfully repaired!");
		}
		else
		    return 0;
	}
	else
	    return 0;

	// Let the server know that this was a valid command
	return 1;
}



Re: 4 Errors - Giroud12 - 20.12.2013

Try remove
pawn Код:
{FFFF00}



Re: 4 Errors - Tuntun - 20.12.2013

Lol,did still same.


Re: 4 Errors - MP2 - 20.12.2013

Compiled fine for me. Perhaps another part of the script interfering? Not sure.

Also, you're over-commenting stuff. You shouldn't comment obvious things - it just makes your code cluttered.


Re: 4 Errors - Tuntun - 20.12.2013

Hmm... i can't find the error... should i send you the full script? and you will check it?


Re: 4 Errors - Excelize - 20.12.2013

Quote:
Originally Posted by MP2
Посмотреть сообщение
Compiled fine for me. Perhaps another part of the script interfering? Not sure.

Also, you're over-commenting stuff. You shouldn't comment obvious things - it just makes your code cluttered.
He didn't over-comment, it was PPC.

His whole gamemode is PPC..


Re: 4 Errors - MP2 - 20.12.2013

Quote:
Originally Posted by Tuntun
Посмотреть сообщение
Hmm... i can't find the error... should i send you the full script? and you will check it?
Sure. PM me if you want to keep it private.

Quote:
Originally Posted by Excelize
Посмотреть сообщение
He didn't over-comment, it was PPC.

His whole gamemode is PPC..
I see.

EDIT: After looking at the full file you sent me, I instantly found a missing quotation mark ( " ) thanks to syntax highlighting, on line 763

SendClientMessage(playerid,-1,Your vehicle has been fliped");

->

SendClientMessage(playerid,-1, "Your vehicle has been fliped");

Also, it's spelt flipped.

Also, you should put spaces after commas to help with readability:

SendClientMessage(playerid, -1, "Your vehicle has been flipped.");


Re: 4 Errors - Tuntun - 20.12.2013

Lool.... that mistake... btw thanks for helping me... +rep. and can you make this command: /respawnallcars to respawn all unused cars?