Question? -
RenSoprano - 16.03.2012
Hello,
I want to ask a question for dini. I had this problem warning
Код:
warning 202: number of arguments does not match definition
how can repair it? If you know please say me.
Re: Question? -
Shabi RoxX - 16.03.2012
show the line in which you have this warning...
Re: Question? -
RenSoprano - 16.03.2012
This is all warnings what I get
pawn Код:
C:\Users\Mario\Desktop\GFHF\gamemodes\rp1.pwn(454) : warning 202: number of arguments does not match definition
C:\Users\Mario\Desktop\GFHF\gamemodes\rp1.pwn(459) : warning 202: number of arguments does not match definition
C:\Users\Mario\Desktop\GFHF\gamemodes\rp1.pwn(460) : warning 202: number of arguments does not match definition
C:\Users\Mario\Desktop\GFHF\gamemodes\rp1.pwn(623) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Warnings.
And here are errors:
pawn Код:
stock SaveHouse(houseid)
{
dini_FloatSet(fstring, "EnterX", HouseInfo[houseid][hEnterX]);
dini_FloatSet(fstring, "EnterY", HouseInfo[houseid][hEnterY]);
dini_FloatSet(fstring, "EnterZ", HouseInfo[houseid][hEnterZ]);
dini_FloatSet(fstring, "ExitX", HouseInfo[houseid][hExitX]);
dini_FloatSet(fstring, "ExitY", HouseInfo[houseid][hExitY]);
dini_FloatSet(fstring, "ExitZ", HouseInfo[houseid][hExitZ]);
dini_IntSet(fstring, "InsideInt", HouseInfo[houseid][hInsideInt]);
dini_IntSet(fstring, "InsideVir", HouseInfo[houseid][hInsideVir]);
dini_IntSet(fstring, "OutsideInt", HouseInfo[houseid][hOutsideInt]);
dini_IntSet(fstring, "OutsideVir", HouseInfo[houseid][hOUtsideVir]);
dini_BoolSet(fstring, "Owned", HouseInfo[houseid][hOwned]);
dini_Get(fstring, "Owner", HouseInfo[houseid][hOwner]); //THIS IS WARNING 454
dini_IntSet(fstring, "Price", HouseInfo[houseid][hPrice]);
dini_IntSet(fstring, "HV_Model", HouseInfo[houseid][hVecModel]);
dini_FloatSet(fstring, "HV_PosX", HouseInfo[houseid][hVecX]);
dini_FloatSet(fstring, "HV_PosZ", HouseInfo[houseid][hVecY]);
dini_Float(fstring, "HV_PosZ", HouseInfo[houseid][hVecZ]); // THIS IS WARNING 459
dini_Float(fstring, "HV_PosA", HouseInfo[houseid][hVecA]); // THIS IS WARNING 460
return 1;
}
And here:
pawn Код:
forward UpdatePlayersHouseInfo();
public UpdatePlayersHouseInfo()
{
new str[100]; //The string we are gonna format
for(new i = 0; i < MAX_PLAYERS; i++) //Loop through all the players
{
for(new j = 0; j < MAX_HOUSES; j++) //Loop through all the houses
{
if(IsPlayerInRangeOfPoint(j, HouseInfo[j][hEnterX], HouseInfo[j][hEnterY], HouseInfo[j][hEnterZ]) && GetPlayerInterior(i) == HouseInfo[j][hOutsideInt] && GetPlayerVirtualWorld(i) == HouseInfo[j][hOutsideVir]) //THIS IS A WARNING 623
{
if(HouseInfo[j][hOwned]) //Is house owned?
format(str, 100, "~w~House owned by ~r~%s", HouseInfo[j][hOwner]); //Will give: {white_color}House owned by {yellow_color}OWNER
else //House isn't owned
format(str, 100, "~w~House for sale!~n~Price: ~g~$%d,-", HouseInfo[j][hPrice]); //Will give: {white_color}House for sale!{new line}Price: {green_color}$PRICE
GameTextForPlayer(i, str, 2000, 3); //Show the text 2 seconds!
}
}
}
return 1;
}
Re: Question? -
Shabi RoxX - 16.03.2012
this:
pawn Код:
dini_Get(fstring, "Owner", HouseInfo[houseid][hOwner]);
should be:
pawn Код:
dini_Set(fstring, "Owner", HouseInfo[houseid][hOwner]);//you're saving house not loading xD
Can you please show enum HouseInfo and tell which are lines 454,459,460 and 623.... Just //comment these line by edited above post
Re: Question? -
RenSoprano - 16.03.2012
pawn Код:
enum hInfo
{
Float:hEnterX, //Entrance X. It's an float! example: 0.0000000. I'm gonna use the same with the other entrances/exits
Float:hEnterY,
Float:hEnterZ,
Float:hExitX,
Float:hExitY,
Float:hExitZ,
InsideInt, //The inside interior.. DUH!
InsideVir, //Already subscribed above
OutsideInt,
OutsideVir,
bool:hOwned, //boolean! Is house owned? NO = False, YES = True
hOwner[MAX_PLAYER_NAME], //The house owner! I'm gonna use MAX_PLAYER_NAME, because a player can't have a longer name :')
hPrice, //Will store the price
hPickup, //The pickup. This is used to remove/move the pickup icon!
hIcon, //The map icon. Also used to remove/move it! We are going to need an ID. Without an ID we can't do NOTHING!
hVecModel, //The housecar's model
hOutsideInt,
hOutsideVir,
hInsideInt,
hInsideVir,
Float:hVecX, //X location. En float too.
Float:hVecY,
Float:hVecZ,
Float:hVecA
};
This is #Enum and I add warnings position in last reply