SA-MP Forums Archive
Assumed a zero error problem please help - 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: Assumed a zero error problem please help (/showthread.php?tid=135800)



Assumed a zero error problem please help - bartje01 - 21.03.2010

Hey guys. I solved a thing my self but now I got this:
Код:
if (strcmp("/challenge", cmdtext, true, 10) == 0)
	
 {
 //GROVEZONE
  new Float:X,Float:Y,Float:Z;

  GetPlayerPos(playerid, X,Y,Z);
  
  {
  if (X <= 2235.0000 && X >= -1729.0000 && Y <= 2501.0000 && Z >= -1642.0000)
  SendClientMessage(playerid, red, "Remember that this is only possible in a turf zone");

  else
  GangZoneFlashForAll(GroveZone,0xFF0000FF);
 }
 //Ballas zone
 else
 {
 if (X <= 1839.726 && X >= -1263.401 && Y <= 2075.502 && Z >= -1054.171)
  SendClientMessage(playerid, red, "Remember that this is only possible in a turf zone");

  else
  GangZoneFlashForAll(GroveZone,0xFF0000FF);
 }
return 1;
}
Errors:
Код:
C:\Users\Bart\Desktop\samp server\filterscripts\ladmin4v2.pwn(5947) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Assumed a zero error problem please help - Fabio11 - 21.03.2010

Where's the line 5947 ??


Re: Assumed a zero error problem please help - dice7 - 21.03.2010

Sorry, but your code doesn't make any sense

pawn Код:
if (strcmp("/challenge", cmdtext, true) == 0)
{
    //GROVEZONE
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(playerid, X,Y,Z);

    if (X <= 2235.0000 && X >= -1729.0000 && Y <= 2501.0000 && Z >= -1642.0000)
    {
        SendClientMessage(playerid, red, "Remember that this is only possible in a turf zone");
    }
    else
    {
        GangZoneFlashForAll(GroveZone,0xFF0000FF);
    }
}
 //Ballas zone
    else
    {
    if (X <= 1839.726 && X >= -1263.401 && Y <= 2075.502 && Z >= -1054.171)
    {
        SendClientMessage(playerid, red, "Remember that this is only possible in a turf zone");
    }
    else
    {
        GangZoneFlashForAll(GroveZone,0xFF0000FF);
    }
    return 1;
}
Are you sure you didn't forget an if () somewhere ?


Re: Assumed a zero error problem please help - bartje01 - 21.03.2010

Quote:
Originally Posted by Fabio11
Where's the line 5947 ??
Ow ya sorry




Re: Assumed a zero error problem please help - Fabio11 - 23.03.2010

You cannot put a "else" if there's no "if" ^^