[Pomoc] : /Work

Započeo ...Neno..., Januar 14, 2012, 09:15:38 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

...Neno...

Skripta koju koristim: Moj od 0
Detaljan opis problema: Izbacuje mi errore na jednu liniju
Dio skripte: Komanda:
if (strcmp("/work", cmdtext, true, 10) == 0)
{
new pmodelid = GetVehicleModel(GetPlayerVehicleID(playerid));
if(gTeam[playerid] != TEAM_DRIVER); return SendClientMessage(playerid,COLOR_WHITE,"ERROR: Vi niste taxi vozac!");
if(!IsTaxi(playerid,pmodelid)); return SendClientMessage(playerid,COLOR_WHITE,"ERROR:Morate biti u taxiu!");
    return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): Erori:
C:\Documents and Settings\Administrator\Desktop\SAMP Server\gamemodes\RS-S.pwn(293) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\SAMP Server\gamemodes\RS-S.pwn(293) : error 001: expected token: ")", but found ";"
C:\Documents and Settings\Administrator\Desktop\SAMP Server\gamemodes\RS-S.pwn(293) : error 036: empty statement
C:\Documents and Settings\Administrator\Desktop\SAMP Server\gamemodes\RS-S.pwn(293) : fatal error 107: too many error messages on one line

Mr.Gagi

Posle if neide ;
if (strcmp("/work", cmdtext, true, 10) == 0)
{
new pmodelid = GetVehicleModel(GetPlayerVehicleID(playerid));
if(gTeam[playerid] != TEAM_DRIVER) return SendClientMessage(playerid,COLOR_WHITE,"ERROR: Vi niste taxi vozac!");
if(!IsTaxi(playerid,pmodelid)) return SendClientMessage(playerid,COLOR_WHITE,"ERROR:Morate biti u taxiu!");
    return 1;
}


EDIT:
Inace ako radis od 0 bolje radi zcmd + sscanf ili ycmd + sscanf
Poslednja Izmena: Januar 14, 2012, 09:20:15 PRE PODNE od [TL:RP]Mr.Gagi

...Neno...

errori opet,jos ih je vise bilo,morao sam izbrisati ''!IsTaxi'',ostaje mi jos ova dva errora
C:\Documents and Settings\Administrator\Desktop\SAMP Server\gamemodes\RS-S.pwn(293) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\SAMP Server\gamemodes\RS-S.pwn(293) : error 001: expected token: ")", but found "return"

Mr.Gagi

Citat: ...Neno... poslato Januar 14, 2012, 10:32:34 PRE PODNE
errori opet,jos ih je vise bilo,morao sam izbrisati ''!IsTaxi'',ostaje mi jos ova dva errora
C:\Documents and Settings\Administrator\Desktop\SAMP Server\gamemodes\RS-S.pwn(293) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\SAMP Server\gamemodes\RS-S.pwn(293) : error 001: expected token: ")", but found "return"
On ti kaze da ti fali ) ali je nasao return
Kako si definisao TEAM_DRIVER?
I jel su ti errori na ovoj liniji
if(gTeam[playerid] != TEAM_DRIVER) return SendClientMessage(playerid,COLOR_WHITE,"ERROR: Vi niste taxi vozac!");  ?

...Neno...

#define TEAM_DRIVER


Da,na toj liniji.

Mr.Gagi

Citat: ...Neno... poslato Januar 14, 2012, 10:45:07 PRE PODNE
#define TEAM_DRIVER


Da,na toj liniji.
To onda dodje kao nista
Definise se ovako
#define TEAM_DRIVER   BROJ_TOG_TIMA
primer:
#define TEAM_DRIVER   1
Poslednja Izmena: Januar 14, 2012, 10:47:58 PRE PODNE od [TL:RP]Mr.Gagi

...Neno...

znao sam da tako treba,sinoc sam pokusao ali jos je komanda bila neispravna,sada sve radi,hvala gagi,car si  8)