14.06.2010, 07:03
But it is wrong, maybe I should post how it saves:
public SaveProperty(propertyid)
{
format(savestring,255,"\\properties\\prop_%d.SAV", propertyid);
if(!dini_Exists(savestring))
{
dini_Create(savestring);
}
dini_IntSet(savestring,"intnum",Props[propertyid][Intnum]);
dini_IntSet(savestring,"InteriorWorld",Props[propertyid][InteriorWorld]);
dini_IntSet(savestring,"DoorUsed_1",Props[propertyid][DoorUsed_1]);
dini_IntSet(savestring,"DoorUsed_2",Props[propertyid][DoorUsed_2]);
dini_IntSet(savestring,"IsLocked",Props[propertyid][IsLocked]);
dini_IntSet(savestring,"Keycode",Props[propertyid][Keycode]);
dini_IntSet(savestring,"PropertyType",Props[propertyid][PropertyType]);
dini_IntSet(savestring,"SubPropertyType",Props[propertyid][SubPropertyType]);
dini_IntSet(savestring,"CurrentPrice",Props[propertyid][CurrentPrice]);
dini_IntSet(savestring,"DefaultPrice",Props[propertyid][DefaultPrice]);
dini_IntSet(savestring,"Payment",Props[propertyid][Payment]);
dini_IntSet(savestring,"OneTimerPayment",Props[propertyid][OneTimerPayment]);
dini_IntSet(savestring,"Fine",Props[propertyid][Fine]);
dini_IntSet(savestring,"Money",Props[propertyid][Money]);
dini_IntSet(savestring,"Income",Props[propertyid][Income]);
dini_IntSet(savestring,"OneTimerIncome",Props[propertyid][OneTimerIncome]);
dini_IntSet(savestring,"LastEnter",Props[propertyid][LastEnter]);
dini_FloatSet(savestring,"EnterX_1",Props[propertyid][EnterX_1]);
dini_FloatSet(savestring,"EnterY_1",Props[propertyid][EnterY_1]);
dini_FloatSet(savestring,"EnterZ_1",Props[propertyid][EnterZ_1]);
dini_FloatSet(savestring,"EnterX_2",Props[propertyid][EnterX_2]);
dini_FloatSet(savestring,"EnterY_2",Props[propertyid][EnterY_2]);
dini_FloatSet(savestring,"EnterZ_2",Props[propertyid][EnterZ_2]);
dini_FloatSet(savestring,"ExitX_1",Props[propertyid][ExitX_1]);
dini_FloatSet(savestring,"ExitY_1",Props[propertyid][ExitY_1]);
dini_FloatSet(savestring,"ExitZ_1",Props[propertyid][ExitZ_1]);
dini_FloatSet(savestring,"ExitA_1",Props[propertyid][ExitA_1]);
dini_FloatSet(savestring,"ExitX_2",Props[propertyid][ExitX_2]);
dini_FloatSet(savestring,"ExitY_2",Props[propertyid][ExitY_2]);
dini_FloatSet(savestring,"ExitZ_2",Props[propertyid][ExitZ_2]);
dini_FloatSet(savestring,"ExitA_2",Props[propertyid][ExitA_2]);
#if USE_TEXTDRAW 1
dini_Set(savestring,"EnterText",PropStrings[propertyid][EnterText]);
dini_Set(savestring,"LeaveText",PropStrings[propertyid][LeaveText]);
#endif
#if USE_ENTER_LABELS 1
dini_Set(savestring,"EnterDoorLabel",PropStrings[propertyid][EnterDoorLabel]);
#endif
return 1;
}
Please help it realy doenst workd!! after restart I only see the name and not the price and property ID
public SaveProperty(propertyid)
{
format(savestring,255,"\\properties\\prop_%d.SAV", propertyid);
if(!dini_Exists(savestring))
{
dini_Create(savestring);
}
dini_IntSet(savestring,"intnum",Props[propertyid][Intnum]);
dini_IntSet(savestring,"InteriorWorld",Props[propertyid][InteriorWorld]);
dini_IntSet(savestring,"DoorUsed_1",Props[propertyid][DoorUsed_1]);
dini_IntSet(savestring,"DoorUsed_2",Props[propertyid][DoorUsed_2]);
dini_IntSet(savestring,"IsLocked",Props[propertyid][IsLocked]);
dini_IntSet(savestring,"Keycode",Props[propertyid][Keycode]);
dini_IntSet(savestring,"PropertyType",Props[propertyid][PropertyType]);
dini_IntSet(savestring,"SubPropertyType",Props[propertyid][SubPropertyType]);
dini_IntSet(savestring,"CurrentPrice",Props[propertyid][CurrentPrice]);
dini_IntSet(savestring,"DefaultPrice",Props[propertyid][DefaultPrice]);
dini_IntSet(savestring,"Payment",Props[propertyid][Payment]);
dini_IntSet(savestring,"OneTimerPayment",Props[propertyid][OneTimerPayment]);
dini_IntSet(savestring,"Fine",Props[propertyid][Fine]);
dini_IntSet(savestring,"Money",Props[propertyid][Money]);
dini_IntSet(savestring,"Income",Props[propertyid][Income]);
dini_IntSet(savestring,"OneTimerIncome",Props[propertyid][OneTimerIncome]);
dini_IntSet(savestring,"LastEnter",Props[propertyid][LastEnter]);
dini_FloatSet(savestring,"EnterX_1",Props[propertyid][EnterX_1]);
dini_FloatSet(savestring,"EnterY_1",Props[propertyid][EnterY_1]);
dini_FloatSet(savestring,"EnterZ_1",Props[propertyid][EnterZ_1]);
dini_FloatSet(savestring,"EnterX_2",Props[propertyid][EnterX_2]);
dini_FloatSet(savestring,"EnterY_2",Props[propertyid][EnterY_2]);
dini_FloatSet(savestring,"EnterZ_2",Props[propertyid][EnterZ_2]);
dini_FloatSet(savestring,"ExitX_1",Props[propertyid][ExitX_1]);
dini_FloatSet(savestring,"ExitY_1",Props[propertyid][ExitY_1]);
dini_FloatSet(savestring,"ExitZ_1",Props[propertyid][ExitZ_1]);
dini_FloatSet(savestring,"ExitA_1",Props[propertyid][ExitA_1]);
dini_FloatSet(savestring,"ExitX_2",Props[propertyid][ExitX_2]);
dini_FloatSet(savestring,"ExitY_2",Props[propertyid][ExitY_2]);
dini_FloatSet(savestring,"ExitZ_2",Props[propertyid][ExitZ_2]);
dini_FloatSet(savestring,"ExitA_2",Props[propertyid][ExitA_2]);
#if USE_TEXTDRAW 1
dini_Set(savestring,"EnterText",PropStrings[propertyid][EnterText]);
dini_Set(savestring,"LeaveText",PropStrings[propertyid][LeaveText]);
#endif
#if USE_ENTER_LABELS 1
dini_Set(savestring,"EnterDoorLabel",PropStrings[propertyid][EnterDoorLabel]);
#endif
return 1;
}
Please help it realy doenst workd!! after restart I only see the name and not the price and property ID