13.09.2009, 16:46
Hello, I'm a bit of a noob when it comes to dini and such.. I'm having a problem where I get this error:
all the time.
This is the code:
Код:
error 033: array must be indexed (variable "owner") // LINE 2937
This is the code:
pawn Код:
if(strcmp(cmd,"/sellprop",true)==0)
{
if(loggedin[playerid]) {
new
id = propPickups[lastPickup[playerid]],
ids[256],
owner[256],
propcost,
Float:x,
Float:y,
Float:z;
format(ids,sizeof(ids),"%d", id);
propcost = dini_Int("propertycost.ini",ids);
GetPropertyEntrance( id, x, y, z );
if( IsPlayerInRangeOfPoint( playerid, 3.0, x, y, z )){
if(ownedprops[playerid]>=1) {
owner = dini_Get("propertyowners.ini",ids);
if(owner == PlayerName(playerid)) { // LINE 2937
GivePlayerMoney(playerid, propcost);
dini_IntSet("propertyowners.ini",ids,0);
ownedprops[playerid]--;
dini_IntSet(playerfile[playerid],"ownedprops",ownedprops[playerid]);
format( string, 128, "You sold your property %d for %d$", id, propcost);
SendClientMessage(playerid, C_YELLOW, string );
}
}
}
}
}