HELP FAST PLEASE - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: HELP FAST PLEASE (
/showthread.php?tid=248916)
Errors... -
Gangasta300 - 16.04.2011
What is wrong with this script?
I get this error's:
Код:
warning 211: possibly unintended assignment
for this one
Код:
if(PlayerInfo[playerid][pPutovnica] = 0
and
Код:
error 029: invalid expression, assumed zero
for this
SCRIPT:
Код:
CMD:granica(playerid,params[])
{
new string[109];
if(PlayerInfo[playerid][pPutovnica] = 0
{
if(PlayerToPoint(15, playerid,1290.98632812,-1325.00195312,37.77450562))
{
MoveDynamicObject(russianlift,55.39017487,-1539.68786621,5.90319920,1);
SetTimer("putovnicazatvori", 6000, 0);
SendClientMessage(playerid, NARANDZASTA,"Kapija se spusta, molimo pricekajte...");
format(string, sizeof(string), "* %s pokazuje putovnicu i prolazi kroz granicu.", ImeIgraca(playerid));
ProxDetector(30.0, playerid, string, ZELENA,ZELENA,ZELENA,ZELENA,ZELENA);
}
else { SendClientMessage(playerid, SIVA,"Destinacija je previse udaljena."); }
}
else return SendClientMessage(playerid, SIVA,"Nemate putovnicu.");
return 1;
}
Re: HELP FAST PLEASE -
iJumbo - 16.04.2011
Try
pawn Код:
CMD:granica(playerid,params[])
{
new string[109];
if(PlayerInfo[playerid][pPutovnica] = 0)
{
if(PlayerToPoint(15, playerid,1290.98632812,-1325.00195312,37.77450562))
{
MoveDynamicObject(russianlift,55.39017487,-1539.68786621,5.90319920,1);
SetTimer("putovnicazatvori", 6000, 0);
SendClientMessage(playerid, NARANDZASTA,"Kapija se spusta, molimo pricekajte...");
format(string, sizeof(string), "* %s pokazuje putovnicu i prolazi kroz granicu.", ImeIgraca(playerid));
ProxDetector(30.0, playerid, string, ZELENA,ZELENA,ZELENA,ZELENA,ZELENA);
}
else
{
SendClientMessage(playerid, SIVA,"Destinacija je previse udaljena.");
}
}
else return SendClientMessage(playerid, SIVA,"Nemate putovnicu.");
return 1;
}
Re: HELP FAST PLEASE -
Stigg - 16.04.2011
pawn Код:
if(PlayerInfo[playerid][pPutovnica] = 0
Should be:
pawn Код:
if(PlayerInfo[playerid][pPutovnica] = 0)
Missed a bracket.
Re: HELP FAST PLEASE -
Gangasta300 - 16.04.2011
tnx for answers, but i have this warning still warning 211: possibly unintended assignment on this command
Код:
if(PlayerInfo[playerid][pPutovnica] = 0)
Re: HELP FAST PLEASE -
iJumbo - 16.04.2011
== not =
Example if(PlayerInfo[playerid][pPutovnica] == 0)
Re: HELP FAST PLEASE -
Gangasta300 - 16.04.2011
tnx all you are the best
Re: HELP FAST PLEASE -
iJumbo - 16.04.2011
Np D: