INI ParseFile, arguement type mismatch -
Aerotactics - 29.05.2014
Brief: I'm confused on how to make this work. The mismatch is on the 3 lines under the LoadBiz function. I have been studying the y_ini tutorial, but it doesn't explain this specific situation. If you make an attempt to fix, explain what you are doing, and why you are doing it please.
pawn Код:
forward Load_Biz(BizID,line[],value[]);
public Load_Biz(BizID,line[],value[])
{
INI_Int("EnterX",bInfo[BizID][EnX]);
INI_Int("EnterY",bInfo[BizID][EnY]);
INI_Int("EnterZ",bInfo[BizID][EnZ]);
return 1;
}
main() print("\n Hello World! \n");
public OnGameModeInit()
{
for (new i=0; i<MAX_BIZ; i++)
{
new filename[64];
format(filename,sizeof(filename),"Biz/%i.ini",i);
if(fexist(filename)){INI_ParseFile(filename, "Load_Biz", .bExtra = true, .extra = i);}
}
return 1;
}
Re: INI ParseFile, arguement type mismatch -
Dignity - 29.05.2014
pawn Код:
forward Load_Biz(BizID,line[],value[]);
public Load_Biz(BizID,line[],value[])
{
INI_Float("EnterX",bInfo[BizID][EnX]);
INI_Float("EnterY",bInfo[BizID][EnY]);
INI_Float("EnterZ",bInfo[BizID][EnZ]);
return 1;
}
edit: i'm sure the bInfo variables are floats, if they are - this will fix it
Re: INI ParseFile, arguement type mismatch -
Aerotactics - 29.05.2014
Quote:
Originally Posted by Mionee
pawn Код:
forward Load_Biz(BizID,line[],value[]); public Load_Biz(BizID,line[],value[]) { INI_Float("EnterX",bInfo[BizID][EnX]); INI_Float("EnterY",bInfo[BizID][EnY]); INI_Float("EnterZ",bInfo[BizID][EnZ]); return 1; }
edit: i'm sure the bInfo variables are floats, if they are - this will fix it
|
While I forgot to add that -- thanks btw -- it didn't resolve the errors.
Re: INI ParseFile, arguement type mismatch -
Dignity - 29.05.2014
pawn Код:
forward Load_Biz(BizID, name[], value[]);
public Load_Biz(BizID, name[], value[]);
Maybe this?
Re: INI ParseFile, arguement type mismatch -
Aerotactics - 29.05.2014
Quote:
Originally Posted by Mionee
pawn Код:
forward Load_Biz(BizID, name[], value[]); public Load_Biz(BizID, name[], value[]);
Maybe this?
|
The error is in the second arguement "value," also I had to rename it from "name" because I already have it in an enum. I can change it though.
EDIT: that was it, thanks Mionee
Re: INI ParseFile, arguement type mismatch -
Dignity - 29.05.2014
because the error occurs at the second param doesn't necessarily mean the second param is incorrect.
nevertheless, yw.
Re: INI ParseFile, arguement type mismatch -
VenomMancer - 29.05.2014
Show your Enum code ?