INI_Int not reading.
#1

I am trying to read a ini file using y_ini.

Code:
pawn Код:
/* CODE */
    new val;
    INI_Int("Origin" , PlayerInfo[playerid][pOrigin]);
    INI_Int("Muted" , PlayerInfo[playerid][pMuted]);
    INI_Int("Respect" , PlayerInfo[playerid][pExp]);
    INI_Int("Money" , val); GivePlayerCash(playerid, val); //This is not working...
    INI_Int("Bank" , PlayerInfo[playerid][pAccount]);
    INI_Int("Crimes" , PlayerInfo[playerid][pCrimes]);
/* Another Code */
All of the code is working except the money one, For some reason it makes the money to 0.
Any help ?
Reply
#2

Check the actual file and see if it's saving properly.
Reply
#3

Quote:
Originally Posted by Divergent
Посмотреть сообщение
Check the actual file and see if it's saving properly.
Already checked it, Its saving properly.
Reply
#4

Alright, then look for any codes that saves money, maybe you're saving it at a wrong time.(after resettingmoney for example)
and you could add a debug to know what does "GivePlayerCash" outputs before it saves
Reply
#5

Quote:
Originally Posted by ******
Посмотреть сообщение
You can't do that - load the data THEN use it.
You mean load it to a global var, then execute the GivePlayerCash function anywhere else ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)