Ich habe ein Problem mit meinem Tank Befehl:
if(strcmp(cmdtext, "/tanken", true) == 0)
{
else if (GetPlayerVehicleSeat(playerid) != 0) return SendClientMessage(playerid,COLOR_RED,"Du bist in keinem Fahrzeug (oder kein Fahrer).");
new car = GetPlayerVehicleID(playerid);
else if (TanktGerade[car]) return SendClientMessage(playerid,COLOR_RED,"Du tankst schon!");
else if (Motor[car] == true) return SendClientMessage(playerid,COLOR_RED,"Du musst vor dem Tanken den Motor ausschalten.");
new ZuTanken = 100-Tank[car];
new preis = ZuTanken * BENZINPREIS;
if (GetPlayerMoney(playerid)-preis < 0) return SendClientMessage(playerid,COLOR_TOMATO,"Du hast nicht genug Geld!");
GivePlayerMoney(playerid, -preis);
SendClientMessage(playerid, COLOR_GREEN, "Tanken wird gestartet.");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid,0);
TanktGerade[car] = true;
tanktimer[playerid] = SetTimerEx("Auftanken",500,true,"i",playerid);
return 1;
}
Erorrs:
C:\Users\Christian\Desktop\Neuer Server\gamemodes\Test.pwn(1132) : error 029: invalid expression, assumed zero
C:\Users\Christian\Desktop\Neuer Server\gamemodes\Test.pwn(1132) : warning 215: expression has no effect
C:\Users\Christian\Desktop\Neuer Server\gamemodes\Test.pwn(1132) : error 001: expected token: ";", but found "if"
C:\Users\Christian\Desktop\Neuer Server\gamemodes\Test.pwn(1134) : error 029: invalid expression, assumed zero
C:\Users\Christian\Desktop\Neuer Server\gamemodes\Test.pwn(1134) : warning 215: expression has no effect
C:\Users\Christian\Desktop\Neuer Server\gamemodes\Test.pwn(1134) : error 001: expected token: ";", but found "if"