Hallöchen,
ich habe ein Problem mit diesem Befehl:
if (strcmp( cmdtext,"/sperre", true )==0)
{
if(PlayerInfo[playerid][pLeader] == 24 || PlayerInfo[playerid][pMember] == 24 || PlayerInfo[playerid][pMember] == 24 || (PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
{
SendClientMessage(playerid, COLOR_YELLOW,"Sie Haben keine Berechtigung");
return 1;
}
if(Sperrebit[playerid]==0)
{
if(!IsPlayerInAnyVehicle(playerid))
{
new Float:x,Float:y,Float:z,Float:a;
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid,a);
GetXYInFrontOfPlayer(playerid,x,y,2.0);
sSperre[playerid][0] = CreateDynamicObject(1228,x,y,z-0.5,0,0,a+90);
sSperre[playerid][1] = CreateDynamicObject(1228,x+2.0 * floatsin(-a+90, degrees),y+2.0 * floatcos(-a+90, degrees),z-0.5,0,0,a+90);
sSperre[playerid][2] = CreateDynamicObject(1228,x+4.0 * floatsin(-a+90, degrees),y+4.0 * floatcos(-a+90, degrees),z-0.5,0,0,a+90);
sSperre[playerid][3] = CreateDynamicObject(1228,x-2.0 * floatsin(-a+90, degrees),y-2.0 * floatcos(-a+90, degrees),z-0.5,0,0,a+90);
sSperre[playerid][4] = CreateDynamicObject(1228,x-4.0 * floatsin(-a+90, degrees),y-4.0 * floatcos(-a+90, degrees),z-0.5,0,0,a+90);
Sperrebit[playerid]=4;
SendClientMessage(playerid, COLOR_YELLOW,"Straßensperre erstellt!");
}
else
{
SendClientMessage(playerid, COLOR_RED,"Du kannst keine Straßensperre erstellen wenn du in einem Auto bist!");
}
}
else
{
DestroyDynamicObject(sSperre[playerid][0]);
DestroyDynamicObject(sSperre[playerid][1]);
DestroyDynamicObject(sSperre[playerid][2]);
DestroyDynamicObject(sSperre[playerid][3]);
DestroyDynamicObject(sSperre[playerid][4]);
Sperrebit[playerid]=0;
SendClientMessage(playerid, COLOR_YELLOW,"Straßensperre abgebaut!");
}
return 1;
}
Ich bekomme folgende Fehler Zeilen:
C:\Users\Birga\Desktop\Time 4 your Reallfe by [T4Y]Domi\gamemodes\T4Y.pwn(24429) : error 029: invalid expression, assumed zero
C:\Users\Birga\Desktop\Time 4 your Reallfe by [T4Y]Domi\gamemodes\T4Y.pwn(24468) : error 029: invalid expression, assumed zero
C:\Users\Birga\Desktop\Time 4 your Reallfe by [T4Y]Domi\gamemodes\T4Y.pwn(24468) : warning 215: expression has no effect
C:\Users\Birga\Desktop\Time 4 your Reallfe by [T4Y]Domi\gamemodes\T4Y.pwn(24468) : error 001: expected token: ";", but found ")"
C:\Users\Birga\Desktop\Time 4 your Reallfe by [T4Y]Domi\gamemodes\T4Y.pwn(24468) : error 029: invalid expression, assumed zero
C:\Users\Birga\Desktop\Time 4 your Reallfe by [T4Y]Domi\gamemodes\T4Y.pwn(24468) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.