Ich habe diese Errors:
C:\Users\ANDY\Desktop\Pawno\gamemodes\LVR.pwn(3) : error 031: unknown directive
C:\Users\ANDY\Desktop\Pawno\gamemodes\LVR.pwn(6) : error 001: expected token: ";", but found "-identifier-"
C:\Users\ANDY\Desktop\Pawno\gamemodes\LVR.pwn(13) : warning 235: public function lacks forward declaration (symbol "TachoTimer")
C:\Users\ANDY\Desktop\Pawno\gamemodes\LVR.pwn(20) : error 017: undefined symbol "X1"
C:\Users\ANDY\Desktop\Pawno\gamemodes\LVR.pwn(20) : warning 215: expression has no effect
C:\Users\ANDY\Desktop\Pawno\gamemodes\LVR.pwn(20) : error 001: expected token: ";", but found "]"
C:\Users\ANDY\Desktop\Pawno\gamemodes\LVR.pwn(20) : error 029: invalid expression, assumed zero
C:\Users\ANDY\Desktop\Pawno\gamemodes\LVR.pwn(20) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
Code:
public TachoTimer()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
new Float:Entfernung, Float:Geschwindigkeit;
GetVehiclePos(GetPlayerVehicleID(i), X1[i], Y1[i], Z1[i]);
Entfernung = floatsqroot(floatpower(floatabs(floatsub(X1[i], X2[i])), 2)+floatpower(floatabs(floatsub(Y1[i], Y2[i])), 2)+floatpower(floatabs(floatsub(Z1[i], Z2[i])), 2));
Geschwindigkeit = (Entfernung / (TACHOTIMER/1000)) * 3.6;
new Tachostring[20];
format(Tachostring, sizeof(Tachostring), "Km/h: %d", floatround(Geschwindigkeit));
TextDrawSetString(Tacho[i], Tachostring);
GetVehiclePos(GetPlayerVehicleID(i), X2[i], Y2[i], Z2[i]);
TextDrawShowForPlayer(i, Tacho[i]);
}
else
{
TextDrawHideForPlayer(i, Tacho[i]);
}
}
return 1;
}
public OnGameModeInit()
{
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
for(new i = 0; i < MAX_PLAYERS; i++)
{
Tacho[i] = TextDrawCreate(481.666748, 378.311126, "KM/H: --");
TextDrawLetterSize(Textdraw5, 0.236666, 1.023407);
TextDrawAlignment(Textdraw5, 1);
TextDrawColor(Textdraw5, -1);
TextDrawSetShadow(Textdraw5, 0);
TextDrawSetOutline(Textdraw5, 1);
TextDrawBackgroundColor(Textdraw5, 51);
TextDrawFont(Textdraw5, 1);
TextDrawSetProportional(Textdraw5, 1);
}
return 1;
}