Another problem -
Micko123 - 09.10.2016
I had problem with saving pickups but i fixed it. Now i have problem with loading them.. It won't load then when player spawn. here is loading
PHP код:
public OnGameModeInit()
{
for(new p = 0; p < MAX_PICKUPA; p++)
{
new piFile[50];
format(piFile, sizeof(piFile), PICKUPI_FILE, p);
if(fexist(piFile))
{
INI_ParseFile(piFile, "UcitajPickupe", .bExtra = true, .extra = p);
PickupInfo[pickid][pPickup] = CreateDynamicPickup(PICKUP_ID, PICKUP_TYPE, PickupInfo[pickid][pX], PickupInfo[pickid][pY], PickupInfo[pickid][pZ]);
pickupi ++;
}
}
return 1;
}
forward UcitajPickupe(name[], value[]);
public UcitajPickupe(name[], value[])
{
INI_Float("X", PickupInfo[pickid][pX]);
INI_Float("Y", PickupInfo[pickid][pY]);
INI_Float("Z", PickupInfo[pickid][pZ]);
return 1;
}
Any ideas?
Re: Another problem -
Micko123 - 09.10.2016
bump?
Re: Another problem -
Threshold - 09.10.2016
Well, your function parameters are incorrect. I suggest you go and take another look at the y_ini tutorial to see what you did wrong.
Are you sure this even compiles properly?
Re: Another problem - Quinncell - 09.10.2016
I am guessing this is the function for loading the pickups?
Код:
forward UcitajPickupe(name[], value[]);
public UcitajPickupe(name[], value[])
{
INI_Float("X", PickupInfo[pickid][pX]);
INI_Float("Y", PickupInfo[pickid][pY]);
INI_Float("Z", PickupInfo[pickid][pZ]);
return 1;
}
If it is, it's wrong.
I suggest you do what @Threshold said and take another look at the Y_ini tutorial.Perhaps the one you followed was wrong.
Also stop bumping threads every 5 mints, that's not allowed!You can bump it every 24h.
Re: Another problem -
Micko123 - 09.10.2016
Can someone explain me what is problem??
I debugged it and it load pickups when i start server.exe but it won't create them in game..
Re: Another problem -
Threshold - 09.10.2016
How does it even compile?
PHP код:
forward UcitajPickupe(name[], value[]);
public UcitajPickupe(name[], value[])
{
INI_Float("X", PickupInfo[pickid][pX]);
INI_Float("Y", PickupInfo[pickid][pY]);
INI_Float("Z", PickupInfo[pickid][pZ]);
return 1;
}
Where have you even defined 'pickid'?
Re: Another problem -
Micko123 - 09.10.2016
Here
PHP код:
enum piInfo
{
pPickup,
Float:pX,
Float:pY,
Float:pZ
}
new PickupInfo[MAX_PICKUPA][piInfo];
new pickid;
Re: Another problem -
Micko123 - 09.10.2016
Does anyone know this
?
Re: Another problem -
Stinged - 09.10.2016
First of all, don't bump before 24 hours.
How did you ever think this was going to work?
'pickid' is always 0, so every time you read a new file, you're setting the values of idx:0 (PickupInfo[MAX_PICKUPA])