wether and time set to 0 when server restarts
#1

This is my code i am trying to save server weather and time in a file called "WeatherInfo.INI" it works and save but when i restart the server both time and weather will be set to 0


My code:

PHP код:
enum wInfo
{
    
Weather,
    
Time
};
new 
WeatherInfo[wInfo];
// gamemodeint
    
INI_ParseFile("WeatherInfo.INI" "LoadWeather_%s", .bExtra true );
    
printf("Weather: %i."WeatherInfo[Weather]);
    
printf("Time: %i."WeatherInfo[Time]);
    
//gamemodeexit
    
new INI:File INI_Open("WeatherInfo.INI");
    
INI_SetTag(File,"WeatherInfo");
    
INI_WriteInt(File,"Weather"WeatherInfo[Weather]);
    
INI_WriteInt(File,"Time"WeatherInfo[Time]);
    
INI_Close(File);
    
//loadfunction
forward LoadWeather_WeatherInfo(name[], value[]);
public 
LoadWeather_WeatherInfo(name[], value[])
{
    
INI_Int("Weather"WeatherInfo[Weather]);
    
INI_Int("Time"WeatherInfo[Time]);
    return 
1;

Reply


Messages In This Thread
wether and time set to 0 when server restarts - by SalmaN97 - 24.03.2016, 16:40
Re: wether and time set to 0 when server restarts - by David (Sabljak) - 24.03.2016, 18:55
Re: wether and time set to 0 when server restarts - by SalmaN97 - 25.03.2016, 13:15
Re: wether and time set to 0 when server restarts - by SalmaN97 - 25.03.2016, 16:21
Re: wether and time set to 0 when server restarts - by Joron - 25.03.2016, 16:28
Re: wether and time set to 0 when server restarts - by SalmaN97 - 25.03.2016, 21:18

Forum Jump:


Users browsing this thread: 2 Guest(s)