11.12.2017, 03:40
DOF2_Exit(); Dini = ?
Okay man, here's the deal, i just tried it again (your new update) and i got one filterscript along with my gamemode, for some ambiguous reason it reads but... it won't write to the files on the filterscript, any idea? the code is very simply its literally just dini_Set, i already used print and the code is executed yet it doesn't write to the file.
|
Okay. I am gonna test the include script thoroughly this time since this update was my final major change to code.
And if you could provide me your filterscript either here or private message so i can test that too. If not thats okay. |
if(spawnedonce[playerid])
{
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
dini_IntSet(zefile,"PSCORE",GetPlayerScore(playerid));
dini_IntSet(zefile,"Interior",GetPlayerInterior(playerid));
dini_IntSet(zefile,"World",GetPlayerVirtualWorld(playerid));
dini_IntSet(zefile,"WantedLevel",GetPlayerWantedLevel(playerid));
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
dini_FloatSet(zefile,"X",X);
dini_FloatSet(zefile,"Y",Y);
dini_FloatSet(zefile,"Z",Z+1);
}
main() {
new const file[] = "test.ini";
dini_IntSet(file, "int", 100);
dini_FloatSet(file, "flt", 100.0);
dini_Set(file, "str", "val_set");
printf("int = %i", dini_Int(file, "int"));
printf("flt = %f", dini_Float(file, "flt"));
printf("str = %s", dini_Get(file, "str"));
printf("dini_NumKeys = %i", dini_NumKeys(file));
printf("dini_Isset = %i", dini_Isset(file, "str"));
dini_Unset(file, "str");
printf("dini_Isset = %i", dini_Isset(file, "str"));
printf("dini_NumKeys = %i", dini_NumKeys(file));
}
I did a quick test and seems like everything works fine. Here test it yourself:
PHP код:
|
E:\Server\Haikal Roleplay\pawno\include\dini2.inc(200) : warning 219: local variable "NULL" shadows a variable at a preceding level |
What happens if I don't use dini_timeout when finishing writing a file??
|