i got 4 erors on my RP mod - 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: i got 4 erors on my RP mod (
/showthread.php?tid=154356)
i got 4 erors on my RP mod -
holyman24 - 13.06.2010
first sorry for my sucks english
i try to make my own roleplay mode and when im try to compile the pwn its gives me 4 erors:
Код:
C:\Documents and Settings\Administrator\Desktop\NewMode.pwn(47214) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\NewMode.pwn(47214) : error 001: expected token: ")", but found "["
C:\Documents and Settings\Administrator\Desktop\NewMode.pwn(47214) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\NewMode.pwn(47214) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\Desktop\NewMode.pwn(47214) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Administrator\Desktop\NewMode.pwn(47214) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
this the line:
Код:
if(x >= gSAZones[i][SAZONE_AREA][0] && x <= gSAZones[i][SAZONE_AREA][3] && y >= gSAZones[i][SAZONE_AREA][1] && y <= gSAZones[i][SAZONE_AREA][4])
and this is all the stoc :
Код:
stock GetVehicleZone(vehicleid, zone[], len)
{
new Float:x, Float:y, Float:z;
GetVehiclePos(vehicleid, x, y, z);
for(new i = 0; i != sizeof(gSAZones); i++ )
{
if(x >= gSAZones[i][SAZONE_AREA][0] && x <= gSAZones[i][SAZONE_AREA][3] && y >= gSAZones[i][SAZONE_AREA][1] && y <= gSAZones[i][SAZONE_AREA][4])
{
return format(zone, len, gSAZones[i][SAZONE_NAME], 0);
}
}
return 0;
}
please help me
Re: i got 4 erors on my RP mod -
holyman24 - 13.06.2010
please help me
Re: i got 4 erors on my RP mod -
Lynn - 13.06.2010
Try,
pawn Код:
if(x >= gSAZones[i][SAZONE_AREA][0] && x <= gSAZones[i][SAZONE_AREA][3] && y >= gSAZones[i][SAZONE_AREA][1] && z <= gSAZones[i][SAZONE_AREA][4]))
Not sure if that will work.
Re: i got 4 erors on my RP mod -
holyman24 - 13.06.2010
same erors
Re: i got 4 erors on my RP mod -
holyman24 - 13.06.2010
please help
Re: i got 4 erors on my RP mod -
DJDhan - 13.06.2010
Try this:
Код:
stock GetVehicleZone(vehicleid, zone[], len)
{
new Float:x, Float:y, Float:z;
GetVehiclePos(vehicleid, x, y, z);
for(new i = 0; i < sizeof(gSAZones); i++ )
{
if((x >= gSAZones[i][SAZONE_AREA][0] && x <= gSAZones[i][SAZONE_AREA][3]) && (y >= gSAZones[i][SAZONE_AREA][1] && y <= gSAZones[i][SAZONE_AREA][4]))
{
return format(zone, len, gSAZones[i][SAZONE_NAME], 0);
}
}
return 0;
}