My Gamemode Warnings (Zones problem)
#1

Hi everyone, I have a CNR Gamemode (San Andreas), I have zones problem and I fixed error, and now the remaining is warnings.

Quote:

C:\Users\USER\Desktop\SKCNR San Francisco 2013\SKCNR SAN ANDREAS SERVER\SERVERSKCNR\gamemodes\CNR.pwn(10987) : warning 202: number of arguments does not match definition
C:\Users\USER\Desktop\SKCNR San Francisco 2013\SKCNR SAN ANDREAS SERVER\SERVERSKCNR\gamemodes\CNR.pwn(10989) : warning 213: tag mismatch
C:\Users\USER\Desktop\SKCNR San Francisco 2013\SKCNR SAN ANDREAS SERVER\SERVERSKCNR\gamemodes\CNR.pwn(10981) : warning 203: symbol is never used: "playerid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Warnings.

The warnings comes from Zones Functions code I believe.

Код:
///////////////////////////
//    Zone Functions
//////////////////////////
 
stock IsPlayerInZone(playerid, zone[])
{
        new TmpZone[MAX_ZONE_NAME];
        GetPlayer3DZone(playerid, TmpZone, sizeof(TmpZone));
        for(new i = 0; i != sizeof(gSAZones); i++)
        {
                if(strfind(TmpZone, zone, true) != -1)
                        return 1;
        }
        return 0;
}
 
stock GetPlayer2DZone(playerid, zone[], len) //Credits to Cueball, Betamaster, Mabako, and Simon (for finetuning).
{
        new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid, 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;
}
 
stock GetPlayer3DZone(playerid, zone[], len) //Credits to Cueball, Betamaster, Mabako, and Simon (for finetuning).
{
        new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid, 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] && z >= gSAZones[i][SAZONE_AREA][2] && z <= gSAZones[i][SAZONE_AREA][5])
                {
                    return format(zone, len, gSAZones[i][SAZONE_NAME], 0);
                }
        }
        return 0;
}
 
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;
}
 
stock GetPlayerZoneID(playerid)
{
        for(new i; i < sizeof(gSAZones); i++) {
                if(IsPlayerInZone(playerid, i)) return i;
                }
}
------
Код:
warning 202: number of arguments does not match definition: if(IsPlayerInZone(i))
warning 213: tag mismatch:  memcpy(pz, gSAZones[i][zone_name], 0, 108);
warning 203: symbol is never used: "playerid": stock ReturnPlayerZone(playerid)
Help!
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: 1 Guest(s)