Errors -
AroseKhanNiazi - 06.05.2014
pawn Code:
E:\Game Modes\1v1_DM_Server\filterscripts\hosune.pwn(85) : error 035: argument type mismatch (argument 1)
E:\Game Modes\1v1_DM_Server\filterscripts\hosune.pwn(86) : error 028: invalid subscript (not an array or too many subscripts): "Houseid"
E:\Game Modes\1v1_DM_Server\filterscripts\hosune.pwn(86) : error 017: undefined symbol "d"
E:\Game Modes\1v1_DM_Server\filterscripts\hosune.pwn(86) : error 029: invalid expression, assumed zero
E:\Game Modes\1v1_DM_Server\filterscripts\hosune.pwn(86) : fatal error 107: too many error messages on one line
pawn Code:
stock HPath(Houseid) //Will create a new stock so we can easily use it later to load/save user's data in user's path
{
new str[128];
for(new d,len = strlen(Houseid); d != len; d++)
Houseid[d] = tolower(Houseid[d]);
format(str,sizeof(str),UserPath,Houseid);
return str;
}
85 LINE
pawn Code:
for(new d,len = strlen(Houseid); d != len; d++)
86 LINE
pawn Code:
Houseid[d] = tolower(Houseid[d]);
Re: Errors -
Konstantinos - 06.05.2014
It should be an array.
Re: Errors -
AroseKhanNiazi - 06.05.2014
thanks but what's problem here can u see please
pawn Code:
stock LoadProperty(Houseid)
{
INI_String("OwnerName",HouseData[Houseid][h_OwnerName]);
INI_Int("OwnerID",HouseData[Houseid][h_OwnerID]);
INI_String("RenterName",HouseData[Houseid][h_RenterName]);
INI_Int("RenterID",HouseData[Houseid][h_RenterID]);
INI_String("HouseName",HouseData[Houseid][h_HouseIntName]);
INI_Int("Value",HouseData[Houseid][h_Value]);
INI_Int("Rent",HouseData[Houseid][h_Rent]);
INI_Int("ForSale",HouseData[Houseid][h_ForSale]);
INI_Int("Alarm",HouseData[Houseid][h_Alarm]);
INI_Int("Lock",HouseData[Houseid][h_Lock]);
INI_Int("Money",HouseData[Houseid][h_Money]);
INI_Int("Drugs",HouseData[Houseid][h_Drugs]);
INI_Int("Condoms",HouseData[Houseid][h_Condoms]);
INI_Int("Flowers",HouseData[Houseid][h_Flowers]);
INI_Int("Robberies",HouseData[Houseid][h_Robberies]);
INI_Int("Breakins",HouseData[Houseid][h_Breakins]);
INI_Int("OwnerVisits",HouseData[Houseid][h_OwnerVisits]);
INI_Int("OtherVisits",HouseData[Houseid][h_OtherVisits]);
INI_Int("Purchasers",HouseData[Houseid][h_Purchasers]);
INI_Int("Rented",HouseData[Houseid][h_Rented]);
return 1;
}
too mcuh errors about undefined symbol INI_STRING,INI_Int
Re: Errors -
AroseKhanNiazi - 07.05.2014
used this
pawn Code:
INI_ParseFile(HPath(Houseid),"loadaccount_%d", .bExtra = true, .extra = Houseid);
Got this error
pawn Code:
error 035: argument type mismatch (argument 1)
Re: Errors -
Ghazal - 07.05.2014
Maybe the fix is.
Code:
INI_ParseFile(HPath(Houseid)),"loadaccount_%d", .bExtra = true, .extra = Houseid);
Re: Errors -
AroseKhanNiazi - 07.05.2014
now it's undefined symbol .bExtra
Re: Errors -
Ghazal - 07.05.2014
Did you define the .bExtra?!
Re: Errors -
AroseKhanNiazi - 07.05.2014
but i don't need to define it ti's already in y_ini
i checked other places [PAWN]INI_ParseFile(HPath(Houseid)),"loadaccount_%d", .bExtra = true, .extra = Houseid);[/PAWN this in not like this it's like
pawn Code:
INI_ParseFile(HPath(Houseid),"loadaccount_%d", .bExtra = true, .extra = Houseid);
Re: Errors -
AroseKhanNiazi - 07.05.2014
undefined symbol bExtra
Re: Errors -
AroseKhanNiazi - 07.05.2014
pawn Code:
#define HousePath "AAdmin/Houses/%s.ini"
//------enum---//
stock HPath(Houseid[])
{
new str[128];
for(new d,len = strlen(Houseid); d != len; d++)
Houseid[d] = tolower(Houseid[d]);
format(str,sizeof(str),HousePath,Houseid);
return str;
}
stock LoadProperty(Houseid)
{
INI_ParseFile(HPath(Houseid)),"LoadProperty_%d", .bExtra = true, .extra = Houseid);
return 1;
}
forward loadproperty_Data(Houseid, name[], value[]);
public loadproperty_Data(Houseid, name[], value[])
{
INI_String("OwnerName",HouseData[Houseid][h_OwnerName]);
INI_Int("OwnerID",HouseData[Houseid][h_OwnerID]);
INI_String("RenterName",HouseData[Houseid][h_RenterName]);
INI_Int("RenterID",HouseData[Houseid][h_RenterID]);
INI_String("HouseName",HouseData[Houseid][h_HouseIntName]);
INI_Int("Value",HouseData[Houseid][h_Value]);
INI_Int("Rent",HouseData[Houseid][h_Rent]);
INI_Int("ForSale",HouseData[Houseid][h_ForSale]);
INI_Int("Alarm",HouseData[Houseid][h_Alarm]);
INI_Int("Lock",HouseData[Houseid][h_Lock]);
INI_Int("Money",HouseData[Houseid][h_Money]);
INI_Int("Drugs",HouseData[Houseid][h_Drugs]);
INI_Int("Condoms",HouseData[Houseid][h_Condoms]);
INI_Int("Flowers",HouseData[Houseid][h_Flowers]);
INI_Int("Robberies",HouseData[Houseid][h_Robberies]);
INI_Int("Breakins",HouseData[Houseid][h_Breakins]);
INI_Int("OwnerVisits",HouseData[Houseid][h_OwnerVisits]);
INI_Int("OtherVisits",HouseData[Houseid][h_OtherVisits]);
INI_Int("Purchasers",HouseData[Houseid][h_Purchasers]);
INI_Int("Rented",HouseData[Houseid][h_Rented]);
return 1;
}