29.05.2011, 04:38
I'm having trouble getting my Biz.ini to load properly. First, here is the code.
The print displays 13 lines of 0's, which is the wrong value and there is only 1 entry in the file.
I've tried different combinations of loops and strval(tag), etc and can't get any successful loads. Thanks in advance.
pawn Code:
//Called under OnGamemodeInit:
INI_ParseFile(BizFile, "ini_load_biz", .bPassTag = true);
// Loading Function:
forward ini_load_biz(bid, tag[], name[], value[]);
public ini_load_biz(bid, tag[], name[], value[])
{
new idx = strval(tag);
INI_String("Owner", BizInfo[idx][Owner], 24);
INI_String("Name", BizInfo[idx][bName], 32);
INI_Int("Price", BizInfo[idx][Price]);
INI_Int("Bank", BizInfo[idx][Bank]);
INI_Int("Locked", BizInfo[idx][Bank]);
INI_Int("Interior", BizInfo[idx][Interior]);
INI_Int("World", BizInfo[idx][World]);
INI_Float("IntX", BizInfo[idx][IntX]);
INI_Float("IntY", BizInfo[idx][IntY]);
INI_Float("IntZ", BizInfo[idx][IntZ]);
INI_Float("ExtX", BizInfo[idx][ExtX]);
INI_Float("ExtY", BizInfo[idx][ExtY]);
INI_Float("ExtZ", BizInfo[idx][ExtZ]);
printf("%i", BizInfo[idx][Price]);
return 1;
}
I've tried different combinations of loops and strval(tag), etc and can't get any successful loads. Thanks in advance.