[Pomoc]Erori oko komande

Započeo ...Nikola..., Jun 21, 2011, 21:38:12 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: FactionGame
Detaljan opis problema:
FactionGame\gamemodes\FG.pwn(34837) : error 001: expected token: ")", but found "-identifier-"

1 Error.

Dio skripte: if (strcmp("/eh", cmdtext, true, 10) == 0)
{
  if(IsPlayerConnected(playerid))
   {
       SendClientMessage(playerid, COLOR_BLACK, "|_____________________________________________|");
       if (PlayerInfo[playerid][pGameMaster] >= 1 || (PlayerInfo[playerid][pAdmin] >= 1)
       SendClientMessage(playerid, COLOR_GREEN, "Da se portate kucajte /eport da stvorite vozila kucajte /vozila ");
       SendClientMessage(playerid, COLOR_WHITE, "Cross Race: /crosso /crossz /cstarto /cstartz");
       SendClientMessage(playerid, COLOR_WHITE, "Hell Race: /hello /hellz /bstarto /bstartz");
       SendClientMessage(playerid, COLOR_WHITE, "Moto/Car Race: /raceo /racez /rstarto /rstartz");
       SendClientMessage(playerid, COLOR_WHITE, "Monster:  /monstero /monsterz");
       SendClientMessage(playerid, COLOR_WHITE, "Survivor: /survivoro /survivorz");
       SendClientMessage(playerid, COLOR_BLACK, "|_____________________________________________|");
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): /
Poslednja Izmena: Jun 21, 2011, 21:46:25 POSLE PODNE od Boki Pro

dragan12

Ovu liniju
if (PlayerInfo[playerid][pGameMaster] >= 1 || (PlayerInfo[playerid][pAdmin] >= 1)
stavi ovako
if (PlayerInfo[playerid][pGameMaster] >= 1) || (PlayerInfo[playerid][pAdmin] >= 1)

FactionGame\gamemodes\FG.pwn(34836) : error 029: invalid expression, assumed zero
FactionGame\gamemodes\FG.pwn(34836 -- 34837) : warning 215: expression has no effect

1 Error.


if (PlayerInfo[playerid][pGameMaster] >= 1) || (PlayerInfo[playerid][pAdmin] >= 1)

Stavio sam ovako i sad eno gore eror i warning.
Da li moze neko pomoci ko zna u cemu je problem

SendClientMessage(playerid, COLOR_GREEN, "Da se portate kucajte /eport da stvorite vozila kucajte /vozila ");

ovo je linija gde je eror
Poslednja Izmena: Jun 21, 2011, 21:57:54 POSLE PODNE od Boki Pro

dragan12

Stavi ovako na FG je pGm
if ((PlayerInfo[playerid][pGm] >= 1) || (PlayerInfo[playerid][pAdmin] >= 1))

if (strcmp("/eh", cmdtext, true, 10) == 0)
{
        if (PlayerInfo[playerid][pGameMaster] < 1 && PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,1,"Neka poruka!");
        SendClientMessage(playerid, COLOR_BLACK, "|_____________________________________________|");
        SendClientMessage(playerid, COLOR_GREEN, "Da se portate kucajte /eport da stvorite vozila kucajte /vozila ");
        SendClientMessage(playerid, COLOR_WHITE, "Cross Race: /crosso /crossz /cstarto /cstartz");
        SendClientMessage(playerid, COLOR_WHITE, "Hell Race: /hello /hellz /bstarto /bstartz");
        SendClientMessage(playerid, COLOR_WHITE, "Moto/Car Race: /raceo /racez /rstarto /rstartz");
        SendClientMessage(playerid, COLOR_WHITE, "Monster:  /monstero /monsterz");
        SendClientMessage(playerid, COLOR_WHITE, "Survivor: /survivoro /survivorz");
        SendClientMessage(playerid, COLOR_BLACK, "|_____________________________________________|");
       return true;
}

hvala ovo gore radi  ;D

A kako da namestim  kad pritisnem odredjeno dugme da se motor vozila pali odmah a ne da pise ovo kao da pokusava da se upali nego cim pritisnem dugme da se upali

public StartingTheVehicle(playerid)
{
   if(IsPlayerConnected(playerid))
   {
       if(IsPlayerInAnyVehicle(playerid))
       {
           new RandomStart;
    new string[128];
    new sendername[MAX_PLAYER_NAME];
           RandomStart = random(4);
           switch(RandomStart)
           {
               case 0,1,2:
               {
                   engineOn[GetPlayerVehicleID(playerid)] = true;
                   TogglePlayerControllable(playerid,1);
                   GetPlayerName(playerid, sendername, sizeof(sendername));
                   format(string, sizeof(string), "Motor se upalio.");
                   ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                   gEngine[playerid] = 0;
               }
               case 3:
               {
                   GetPlayerName(playerid, sendername, sizeof(sendername));
                   format(string, sizeof(string), "Motor se nije upalio.");
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
gEngine[playerid] = 0;
               }
           }
       }
else
{
   gEngine[playerid] = 0;
}
   }
   return 1;
}


Moze li mi ko pomoci ?
Poslednja Izmena: Jun 21, 2011, 22:16:09 POSLE PODNE od Boki Pro