Yoa guten morgen.
ich habe jez ne Sirene eingebaut in mein Script.
Jez kriege ich aber 4 errors:
[hide]C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(16785) : error 017: undefined symbol "sirene"
C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(16785) : error 001: expected token: ";", but found "]"
C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(16785) : error 029: invalid expression, assumed zero
C:\Users\Sven\Desktop\3c Client released\gamemodes\lyd.pwn(16785) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
[/hide]
Hier der Code:
if(strcmp(cmdtext, "/Sirene", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsACop(playerid) || IsPlayerInFrac(playerid,4) || IsAFbi(playerid))
{
new sirene;
new vehicleid = GetPlayerVehicleID(playerid);
sirene = CreateObject(18646, 0, 0, 0, 0, 0, 0, 0);
AttachObjectToVehicle(sirene, vehicleid, 0-0.5, 0, 0+0.68, 0, 0, 0);
GameTextForPlayer(playerid,"~r~Sirene Aktiviert",5000, 1);
SendClientMessage(playerid, COLOR_GREY, "Du kannst die Sirene mit erneutem eingeben von /sirene wieder ausschalten!");
return 1;
}
else
{
DestroyObject(sirene[GetPlayerVehicleID(playerid)]); //problemzeile
}
}
return 1;
}
Hoffe jemand weis wo der Fehler liegt.
mfg lolli