Wie kann man das scripten (bei mir kommen 4fehler)
(25060) : error 017: undefined symbol "Parkkralle"
(25060) : warning 215: expression has no effect
(25060) : error 001: expected token: ";", but found "]"
(25060) : error 029: invalid expression, assumed zero
(25060) : 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.
//==============Parkralle==================//
if(strcmp(cmd, "/parkkralle", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 24 || PlayerInfo[playerid][pLeader] == 24)
{
new Float:bX,Float:bY,Float:bZ;
GetPlayerPos(playerid,bX,bY,bZ);
new Float:aX,Float:aY,Float:aZ;
new Found=0;
new vid=0;
new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
SendClientMessage(playerid, COLOR_WHITE, "============= [Parkkralle] =============");
SendClientMessage(playerid, COLOR_WHITE, "FEHLER: /parkkralle [name]");
SendClientMessage(playerid, COLOR_GREY, "Verfügbare namen: Anbauen, Abbauen");
SendClientMessage(playerid, COLOR_WHITE, "============= [Parkkralle] =============");
return 1;
}
if(strcmp(x_nr,"Anbauen",true) == 0)
{
while((vid<MAX_VEHICLES)&&(!Found))
{
vid++;
GetVehiclePos(vid,aX,aY,aZ);
if((floatabs(bX-aX)<3.0)&&(floatabs(bY-aY)<3.0)&&(floatabs(bZ-aZ)<3.0)&&(vid!=GetPlayerVehicleID(playerid)))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
Parkkralle[vid] = 1; <------Hier ist der fehler
format(string, sizeof(string), "* %s baut eine Parkkralle an das Fahrzeug.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
OnPlayerCarUpdate(playerid);
}
}
}
if(strcmp(x_nr,"Abbauen",true) == 0)
{
while((vid<MAX_VEHICLES)&&(!Found))
{
vid++;
GetVehiclePos(vid,aX,aY,aZ);
if ((floatabs(bX-aX)<3.0)&&(floatabs(bY-aY)<3.0)&&(floatabs(bZ-aZ)<3.0)&&(vid!=GetPlayerVehicleID(playerid)))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
Parkkralle[vid] = 0;
format(string, sizeof(string), "* %s baut die Parkkralle des Fahrzeugs ab.", sendername, handyname);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
OnPlayerCarUpdate(playerid);
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du gehörst nicht zum Ordnungsamt!");
}
}
return 1;
}