Hallo Brotfische habe grade versucht ein Tacho zu Scripten.
Dabei sit ein Problem aufgetreten.
unzwar folgendes:
[pwn=48]//Tacho
new Text:Tacho[MAX_PLAYERS];
forward UpdateTacho();
#define Tachotimer 1000;
new Float: X1[MAX_PLAYERS],Float:Y1[MAX_PLAYERS],Float:Z1[MAX_PLAYERS];
new Float: X2[MAX_PLAYERS],Float:Y2[MAX_PLAYERS],Float:Z2[MAX_PLAYERS];[/pwn]
[pwn=59]public OnGameModeInit()
{
//Tacho
for(new x= 0; x<MAX_PLAYERS;x++)
{
Tacho[x] = TextDrawCreate(357.0000,340.0000,"Uninterressant");
TextDrawLetterSize(Tacho[x],0.4,1.1);
TextDrawFont(Tacho[x],1);
TextDrawSetShadow(Tacho[x],2);
TextDrawSetOutline(Tacho[x],1);
}
SetTimer("UpdateTacho",Tachotimer,1);
return 1;
}[/pwn]
[pwn=437]public UpdateTacho()
{
for(new i = 0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER && !IsPlayerNPC(i))
{
new Float:Strecke,Float:Geschwindigkeit;
GetVehiclePos(GetPlayerVehicleID(i),X1[i],Y1[i],Z1[i]);
Strecke = 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 = (Strecke /(Tachotimer/1000)) + 3,6;
new String[50];
format(String,50,Geschwindigkeit: %d km/h,floatround(Geschwindigkeit));
TextDrawSetString(Tacho[i],String);
GetVehiclePos(GetPlayerVehicleID(i),X2[i],Y2[i],Z2[i]);
TextDrawShowForPlayer(i,Tacho[i]);
}
else
{
TextDrawHideForPlayer(i,Tacho[i]);
}
}
return 1;
}
[/pwn]
ich bekomme Folgende Errors:
Untitled.pwn(70) : error 001: expected token: ",", but found ";"
Untitled.pwn(70) : error 029: invalid expression, assumed zero
Untitled.pwn(70) : warning 215: expression has no effect
Untitled.pwn(70) : error 001: expected token: ";", but found ")"
Untitled.pwn(70) : fatal error 107: too many error messages on one line
Ich sehe den Fehler einfach nicht :o
mfg
MenInBlack