14.10.2012, 14:07
Alright so basically here's my stocks that i used to make a MOTD system:
I save the file under OnGameModExit and i load it under OnGameModeInit...The file saves with data as folllows:
So the files saves and there is no problem with that but i have simply no idea why it doesn't load after GMX,even though i call it with the LoadMOTDS stock under OnGameModeInit.On localhost works fine,but when i up it on our hosting service it doesn't work...i have every YSI library installed there too(3.1),so it's not from that.Can anyone help me?
pawn Код:
stock SaveMOTDS()
{
//new file[16];
new INI:File = INI_Open("motds.ini");
INI_SetTag(File, "MOTDS");
INI_WriteString(File, "Server", ServerMOTD);
INI_WriteString(File, "LSPD", SAPDMOTD);
INI_WriteString(File, "GOV", GOVMOTD);
INI_WriteString(File, "HA", HAMOTD);
INI_WriteString(File, "Admin", AdminMOTD);
INI_WriteString(File, "Login", LoginMOTD);
INI_Close(File);
print("MOTDs saved successfully.");
return 1;
}
INI:motds[MOTDS](name[], value[])
{
INI_String("Server", ServerMOTD, 128);
INI_String("LSPD", SAPDMOTD, 128);
INI_String("GOV", GOVMOTD, 128);
INI_String("HA", HAMOTD, 128);
INI_String("Admin", AdminMOTD, 128);
INI_String("Login", LoginMOTD, 128);
return 0;
}
stock LoadMOTDS()
{
new fileName[10] = "motds.INI";
INI_Load(fileName);
print("MOTDs loaded successfully.");
return 1;
}
pawn Код:
[MOTDS]
Server = randomtext
LSPD = randomtext
GOV = randomtext
HA = randomtext
Admin = randomtext
Login = randomtext