My Gamemode Warnings (Zones problem)
#2

warning 202: number of arguments does not match definition: if(IsPlayerInZone(i))
Check the functions, it should be: IsPlayerInZone(playerid, zone[]) - Here you forgot the zone parameter

warning 213: tag mismatch: memcpy(pz, gSAZones[i][zone_name], 0, 10;
memcpy(dest[], const source[], index=0, numbytes, maxlength=sizeof dest) - Tag mismatch: This 'pz', is this a string or not?

warning 203: symbol is never used: "playerid": stock ReturnPlayerZone(playerid)
Just as it says, the parameter 'playerid' in ReturnPlayerZone hasn't been used it seems.
Jup, check this stock ReturnPlayerZone(playerid); it loops through all zones and is using thбt as a player id:
pawn Код:
stock ReturnPlayerZone(playerid)
{
 new pz[128]; //128 is better unless its a long text.
 format(pz, sizeof(pz), "Unknown");
 for(new i; i < sizeof(gSAZones); i++) //If error happens, just write in the size.
 {
   if(IsPlayerInZone(i))
 {
  memcpy(pz, gSAZones[i][zone_name], 0, 108);
  break;
  }
}
 return pz;
}
The IsPlayerInZone(i) should be IsPlayerInZone(playerid) - Then it will work as it should work, and then you won't have that warning anymore
Reply


Messages In This Thread
My Gamemode Warnings (Zones problem) - by Uberanwar - 12.05.2013, 07:17
Re: My Gamemode Warnings (Zones problem) - by Kwarde - 12.05.2013, 09:24
Re: My Gamemode Warnings (Zones problem) - by JaKe Elite - 12.05.2013, 10:20
Re: My Gamemode Warnings (Zones problem) - by Uberanwar - 12.05.2013, 10:21
Re: My Gamemode Warnings (Zones problem) - by Kwarde - 12.05.2013, 12:41

Forum Jump:


Users browsing this thread: 2 Guest(s)