Y_INI doesnt load
#1

i did easy script for show what Y_INI does to me

paste bin link is here

This script shoud does this:
-save position of car (X,Y,Z)
-save Lock and Alarm (if is activated or no)
-and save model of vehicle where i write /savec (that c means car)

save works fine ! here is what this script saved
Код:
[Auto]
Model = 411
PosX = 1751.392578
PosY = -2111.434570
PosZ = 13.223710
Alarm = -1
Lock = -1
this is what i want , but when i want to load this things to spawn my saved car (after my re-connect)
nothing happend

thats reason why i add to my script this
Код:
printf("%d %d %d %d Here is pos and modelid",CarInformation[playerid][Model] , CarInformation[playerid][cX], CarInformation[playerid][cY], CarInformation[playerid][cZ]);
But that printf.. print me to console only this
0 0 0 0 Here is pos and modelid ,
And the car is NOT spawn.

I'm realy sorry for my Amazing bad english...
But can somebody help me?
Reply
#2

pawn Код:
printf("%f %f %f %f Here is pos and modelid",CarInformation[playerid][Model] , CarInformation[playerid][cX], CarInformation[playerid][cY], CarInformation[playerid][cZ]);
Check if 'cX' 'cY' 'cZ' are float.
Reply
#3

I try it and it print this
Reply
#4

Can't see the postbin but what I would say is make sure that the enums are floats they are saved as floats they are loaded as floats !
Also y_ini needs to Peres files to load them so make sure you do that but persing them make sure your persing them as strin two.
Reply
#5

I have write and load with float and enum too. But i dont understand "Peres files" and persing
Reply
#6

No body. ? Or some writing and loading system what is easy for use
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)