Trucking Error Help Please
#1

EDIT: Fixed
Reply
#2

Change
pawn Код:
SetupSpeedCamera(CamID, Float:x, Float:y, Float:z, Float:rot, MaxSpeed)
To this;
Код:
SetupSpeedCamera(CamID, Float:x, Float:y, Float:z, Float:rot, MaxSpeed);
Reply
#3

Quote:
Originally Posted by Lynn
Посмотреть сообщение
Change
pawn Код:
SetupSpeedCamera(CamID, Float:x, Float:y, Float:z, Float:rot, MaxSpeed)
To this;
Код:
SetupSpeedCamera(CamID, Float:x, Float:y, Float:z, Float:rot, MaxSpeed);
nothing happens still errors
Reply
#4

Post the entire thing in Pastebin.
I can't be bothered to go through that lose indention mess it creates when its posted on here.
Reply
#5

Quote:
Originally Posted by Lynn
Посмотреть сообщение
Post the entire thing in Pastebin.
I can't be bothered to go through that lose indention mess it creates when its posted on here.
http://pastebin.com/hZjmsGm3
Reply
#6

Код:
// This function creates a speedcamera (store data and create the objects)
SetupSpeedCamera(CamID, Float:x, Float:y, Float:z, Float:rot, MaxSpeed)
}
    new TextMaxSpeed[30];

// Store all the given values
    ACameras[CamID][CamX] = x;
    ACameras[CamID][CamY] = y;
    ACameras[CamID][CamZ] = z;
    ACameras[CamID][CamAngle] = rot;
    ACameras[CamID][CamSpeed] = MaxSpeed;
// Create both camera objects and store their reference
    ACameras[CamID][CamObj1] = CreateObject(18880, x, y, z, 0.0, 0.0, rot);
    ACameras[CamID][CamObj2] = CreateObject(18880, x, y, z, 0.0, 0.0, rot + 180.0);
    format(TextMaxSpeed, sizeof(TextMaxSpeed), "%s %i", TXT_MaxSpeedCamera, MaxSpeed);
    ACameras[CamID][LabelID] = Create3DTextLabel(TextMaxSpeed, 0xFF0000FF, x, y, z + 0.75, 100.0, 0, 0);
}
Reply
#7

new error Line 256 is now Fixed

Код:
C:\Users\Matt\Desktop\Untitled.pwn(169) : error 017: undefined symbol "APlayerData"
C:\Users\Matt\Desktop\Untitled.pwn(169) : warning 215: expression has no effect
C:\Users\Matt\Desktop\Untitled.pwn(169) : error 001: expected token: ";", but found "]"
C:\Users\Matt\Desktop\Untitled.pwn(169) : error 029: invalid expression, assumed zero
C:\Users\Matt\Desktop\Untitled.pwn(169) : fatal error 107: too many error messages on one line

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


4 Errors.
line

pawn Код:
// Decrease the remaining time this player will be frozen
APlayerData[playerid][PlayerFrozen]--;
Reply
#8

Compare codes:
Код:
// This timer informs the player how long he will be frozen
forward Player_FreezeTimer(playerid);
public Player_FreezeTimer(playerid)
{
	// Setup local variables
	new Msg[128];

	// Decrease the remaining time this player will be frozen
	APlayerData[playerid][PlayerFrozen]--;

	// Check if the player is allowed to move again
	if (APlayerData[playerid][PlayerFrozen] >= 1)
	{
		// Construct the message to inform the player how long he stays frozen
		if (APlayerData[playerid][PlayerFrozen] >= 60)
			format(Msg, 128, "Frozen for %i minutes", APlayerData[playerid]

[PlayerFrozen] / 60);
		else
			format(Msg, 128, "Frozen for %i seconds", APlayerData[playerid]

[PlayerFrozen]);

		// Display the message to inform the player how long he stays frozen
		GameTextForPlayer(playerid, Msg, 1000, 4);
	}
	else { // The timer has run out, so allow his to move again
		TogglePlayerControllable(playerid, 1);
		KillTimer(FreezeTimer[playerid]);
	}
}
Reply
#9

Quote:
Originally Posted by ZaBraNjeNi
Посмотреть сообщение
Compare codes:
Код:
// This timer informs the player how long he will be frozen
forward Player_FreezeTimer(playerid);
public Player_FreezeTimer(playerid)
{
	// Setup local variables
	new Msg[128];

	// Decrease the remaining time this player will be frozen
	APlayerData[playerid][PlayerFrozen]--;

	// Check if the player is allowed to move again
	if (APlayerData[playerid][PlayerFrozen] >= 1)
	{
		// Construct the message to inform the player how long he stays frozen
		if (APlayerData[playerid][PlayerFrozen] >= 60)
			format(Msg, 128, "Frozen for %i minutes", APlayerData[playerid]

[PlayerFrozen] / 60);
		else
			format(Msg, 128, "Frozen for %i seconds", APlayerData[playerid]

[PlayerFrozen]);

		// Display the message to inform the player how long he stays frozen
		GameTextForPlayer(playerid, Msg, 1000, 4);
	}
	else { // The timer has run out, so allow his to move again
		TogglePlayerControllable(playerid, 1);
		KillTimer(FreezeTimer[playerid]);
	}
}
nothing still got errors in that line
Reply
#10

Download my file, and put in your include's file.
And than re-compile.

http://www.solidfiles.com/d/c9ea57405c/PPC_Common.inc
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)