How to load Float from .ini with Y_ini
#10

Quote:
Originally Posted by iPLEOMAX
View Post
Few tips:

1. Don't add any other things to the parse function. (Because it gets called multiple times during parse).

pawn Code:
public load_user_data_basic(playerid, name[], value[])
{
    INI_Float("X1", PosInfo6[posx]);
    INI_Float("Y1", PosInfo6[posy]);
    INI_Float("Z1", PosInfo6[posz]);
    //station[s1] = CreatePickup(1318, 1, PosInfo6[posx],PosInfo6[posy],PosInfo6[posz], 0); < Remove this.
    return 1;
}
//This function will call multiple times so creating pickup with it isn't a good idea.

2. Use arrays inside single enum instead of multiple enums.
Example:
pawn Code:
enum posinfo
{
    Float:posx[7],
    Float:posy[7],
    Float:posz[7],
};
new PosInfo[MAX_PLAYERS][posinfo];

//Reduced many lines..

//Usage:
PosInfo[playerid][posx][0] = 51.00

PosInfo[playerid][posx][2] = 15.00

PosInfo[playerid][posx][5] = 27.00
OK ty i will fix it but where i must place the createpickup?
Reply


Messages In This Thread
How to load Float from .ini with Y_ini - by Horrible - 22.08.2011, 08:46
Re: How to load Float from .ini with Y_ini - by [MWR]Blood - 22.08.2011, 08:54
Re: How to load Float from .ini with Y_ini - by Horrible - 22.08.2011, 09:00
Re: How to load Float from .ini with Y_ini - by Basicz - 22.08.2011, 12:03
Re: How to load Float from .ini with Y_ini - by Kush - 22.08.2011, 20:15
Re: How to load Float from .ini with Y_ini - by Horrible - 23.08.2011, 00:12
Re: How to load Float from .ini with Y_ini - by Kush - 23.08.2011, 00:29
Re: How to load Float from .ini with Y_ini - by Horrible - 23.08.2011, 00:37
Re: How to load Float from .ini with Y_ini - by iPLEOMAX - 23.08.2011, 00:43
Re: How to load Float from .ini with Y_ini - by Horrible - 23.08.2011, 00:45

Forum Jump:


Users browsing this thread: 3 Guest(s)