unknown warnings
#1

Hello, i made dynamic point system, but getting some warnings what did i placed from

LINE: 25670
Код:
	if(IsAtDynamicPoint(playerid)) switch(PlayerInfo[playerid][pDonateRank]) {
LINE: 21816
Код:
if(!IsAtDynamicPoint(playerid))
					{
                        if(playerid == giveplayerid)
						{
                            SendClientMessageEx(playerid, COLOR_GRAD2, "You cannot deliver yourself to the hospital!");
                            return 1;
                        }
LINE:4439 and 4455
Код:
CMD:buyinsurance(playerid, params[])
{
    if(!IsAtDynamicPoint(playerid) && PlayerInfo[playerid][pVW] == 2) {
        if (GetPlayerCash(playerid) >= 4000) {
            if (PlayerInfo[playerid][pInsurance] != 1) {
                GivePlayerCash(playerid, -4000);
                PlayerInfo[playerid][pInsurance] = 1;
                SendClientMessageEx(playerid, COLOR_WHITE, "   Insurance purchased, you paid $1,500 + a one-time transfer fee of $2,500, you will now be healed at County General Hospital for $1,500.");
                return 1;
            }
            else {
                SendClientMessageEx(playerid, COLOR_GRAD4, "You already have insurance at County General Hospital!");
            }
        }
        else {
            SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have enough money for this insurance!");
        }
    }
    else if(!IsAtDynamicPoint(playerid) && PlayerInfo[playerid][pVW] == 1) {
        if (GetPlayerCash(playerid) >= 4000) {
            if (PlayerInfo[playerid][pInsurance] != 2) {
                GivePlayerCash(playerid, -4000);
                PlayerInfo[playerid][pInsurance] = 2;
                SendClientMessageEx(playerid, COLOR_WHITE, "   Insurance purchased, you paid $1,500 + a one-time transfer fee of $2,500, you will now be healed at All Saints Hospital for $1,500.");
                return 1;
            }
            else {
                SendClientMessageEx(playerid, COLOR_GRAD4, "You already have insurance at All Saints Hospital!");
            }
        }
        else {
            SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have enough money for this insurance!");
        }
    }
Warning code
Код:
(4439) : warning 202: number of arguments does not match definition
(4455) : warning 202: number of arguments does not match definition
(21816) : warning 202: number of arguments does not match definition
(25670) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Warnings.
Reply
#2

Anyone ?
Reply
#3

Show the stock/function heading(prototype) of IsAtDynamicPoint
Reply
#4

Код:
stock IsAtDynamicPoint(playerid, type)
{
	if(IsPlayerConnected(playerid))
	{
		for(new x; x < MAX_DYNAMICPOINTS; x++)
		{
			if(DynamicPoints[x][dynamicPosX] != 0)
			{
				if(DynamicPoints[x][dynamicType] == type)
				{
					switch(DynamicPoints[x][dynamicType])
					{
						case 0:
						{
							if(IsPlayerInRangeOfPoint(playerid, 10.0, DynamicPoints[x][dynamicPosX], DynamicPoints[x][dynamicPosY], DynamicPoints[x][dynamicPosZ]) && GetPlayerInterior(playerid) == DynamicPoints[x][dynamicInt] && GetPlayerVirtualWorld(playerid) == DynamicPoints[x][dynamicVW]) return 1;
						}
						case 1:
						{
							if(IsPlayerInRangeOfPoint(playerid, 10.0, DynamicPoints[x][dynamicPosX], DynamicPoints[x][dynamicPosY], DynamicPoints[x][dynamicPosZ]) && GetPlayerInterior(playerid) == DynamicPoints[x][dynamicInt] && GetPlayerVirtualWorld(playerid) == DynamicPoints[x][dynamicVW]) return 1;
						}
						case 2:
						{
							if(IsPlayerInRangeOfPoint(playerid, 10.0, DynamicPoints[x][dynamicPosX], DynamicPoints[x][dynamicPosY], DynamicPoints[x][dynamicPosZ]) && GetPlayerInterior(playerid) == DynamicPoints[x][dynamicInt] && GetPlayerVirtualWorld(playerid) == DynamicPoints[x][dynamicVW]) return 1;
						}
						case 3:
						{
							if(IsPlayerInRangeOfPoint(playerid, 10.0, DynamicPoints[x][dynamicPosX], DynamicPoints[x][dynamicPosY], DynamicPoints[x][dynamicPosZ]) && GetPlayerInterior(playerid) == DynamicPoints[x][dynamicInt] && GetPlayerVirtualWorld(playerid) == DynamicPoints[x][dynamicVW]) return 1;
						}
						case 4:
						{
							if(IsPlayerInRangeOfPoint(playerid, 10.0, DynamicPoints[x][dynamicPosX], DynamicPoints[x][dynamicPosY], DynamicPoints[x][dynamicPosZ]) && GetPlayerInterior(playerid) == DynamicPoints[x][dynamicInt] && GetPlayerVirtualWorld(playerid) == DynamicPoints[x][dynamicVW]) return 1;
						}
					}
				}
			}
		}
	}
	return 0;
}
Reply
#5

You created the function like this:
pawn Код:
IsAtDynamicPoint(playerid, type)
Yet you are only using "playerid", not "type".
pawn Код:
IsAtDynamicPoint(playerid)
You need to use it with all the arguments you created.
Reply
#6

its not just 1 dynamic point i got 4 types
Reply
#7

And what is the difference between these 4 types?
pawn Код:
switch(DynamicPoints[x][dynamicType])
                    {
                        case 0:
                        {
                            if(IsPlayerInRangeOfPoint(playerid, 10.0, DynamicPoints[x][dynamicPosX], DynamicPoints[x][dynamicPosY], DynamicPoints[x][dynamicPosZ]) && GetPlayerInterior(playerid) == DynamicPoints[x][dynamicInt] && GetPlayerVirtualWorld(playerid) == DynamicPoints[x][dynamicVW]) return 1;
                        }
                        case 1:
                        {
                            if(IsPlayerInRangeOfPoint(playerid, 10.0, DynamicPoints[x][dynamicPosX], DynamicPoints[x][dynamicPosY], DynamicPoints[x][dynamicPosZ]) && GetPlayerInterior(playerid) == DynamicPoints[x][dynamicInt] && GetPlayerVirtualWorld(playerid) == DynamicPoints[x][dynamicVW]) return 1;
                        }
                        case 2:
                        {
                            if(IsPlayerInRangeOfPoint(playerid, 10.0, DynamicPoints[x][dynamicPosX], DynamicPoints[x][dynamicPosY], DynamicPoints[x][dynamicPosZ]) && GetPlayerInterior(playerid) == DynamicPoints[x][dynamicInt] && GetPlayerVirtualWorld(playerid) == DynamicPoints[x][dynamicVW]) return 1;
                        }
                        case 3:
                        {
                            if(IsPlayerInRangeOfPoint(playerid, 10.0, DynamicPoints[x][dynamicPosX], DynamicPoints[x][dynamicPosY], DynamicPoints[x][dynamicPosZ]) && GetPlayerInterior(playerid) == DynamicPoints[x][dynamicInt] && GetPlayerVirtualWorld(playerid) == DynamicPoints[x][dynamicVW]) return 1;
                        }
                        case 4:
                        {
                            if(IsPlayerInRangeOfPoint(playerid, 10.0, DynamicPoints[x][dynamicPosX], DynamicPoints[x][dynamicPosY], DynamicPoints[x][dynamicPosZ]) && GetPlayerInterior(playerid) == DynamicPoints[x][dynamicInt] && GetPlayerVirtualWorld(playerid) == DynamicPoints[x][dynamicVW]) return 1;
                        }
                    }
They are all doing the exact same code...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)