Код:
Hello, I'm made the follow Saveproperties callback
I will show all the steps .
I just cannot find the error its fucking annoying me....
Код:
enum
InteriorsSettings {
InteriorID,
InteriorType,
Float:EntX,
Float:EntY,
Float:EntZ,
Float:EntA,
UniqIntId,
InteriorName[128],
};
new InteriorSet[5][InteriorsSettings];
Код:
public LoadProperties()
{
new arrCoords[8][64];
new strFromFile2[256];
new File: file = fopen("properties.cfg", io_read);
if (file)
{
new idx;
while (idx < sizeof(InteriorSet))
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, '|');
strmid(InteriorSet[idx][InteriorName], arrCoords[0], 0, strlen(arrCoords[0]), 255);
InteriorSet[idx][EntX] = floatstr(arrCoords[1]);
InteriorSet[idx][EntY] = floatstr(arrCoords[2]);
InteriorSet[idx][EntZ] = floatstr(arrCoords[3]);
InteriorSet[idx][EntA] = floatstr(arrCoords[4]);
InteriorSet[idx][UniqIntId] = strval(arrCoords[5]);
InteriorSet[idx][InteriorID] = strval(arrCoords[6]);
InteriorSet[idx][InteriorType] = strval(arrCoords[7]);
printf("%d %d %s",InteriorSet[idx][InteriorID],InteriorSet[idx][InteriorType],InteriorSet[idx][InteriorName]);
idx++;
}
fclose(file);
}
return 1;
}
Server log:
----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3a R4, ©2005-2009 SA-MP Team
[14:30:26] filterscripts = "" (string)
[14:30:26]
[14:30:26] Server Plugins
[14:30:26] --------------
[14:30:26] Loaded 0 plugins.
[14:30:26]
[14:30:26] Filter Scripts
[14:30:26] ---------------
[14:30:26] Loaded 0 filter scripts.
[14:30:26] 0 0 ��N <<<<<<<<<<<<<<<<< WTF???
[14:30:26] 0 0
[14:30:26] 0 0
[14:30:26] 0 0
[14:30:26] 0 0
[14:30:26] Loaded 30 vehicles from: vehicles/ls_airport.txt
[14:30:26] Loaded 76 vehicles from: vehicles/ls_gen_inner.txt
[14:30:26] Loaded 327 vehicles from: vehicles/ls_gen_outer.txt
[14:30:26]
----------------------------------
[14:30:26] Los Santos RP Streets
[14:30:26] ----------------------------------
[14:30:26] Number of vehicle models: 76
Properties file:
None|0.0|0.0|0.0|0.0|0|0|0None|0.0|0.0|0.0|0.0|0|0|0None|0.0|0.0|0.0|0.0|0|0|0None|0.0|0.0|0.0|0.0|0|0|0None|0.0|0.0|0.0|0.0|0|0|0
pawn Код:
enum
InteriorsSettings {
InteriorID,
InteriorType,
Float:EntX,
Float:EntY,
Float:EntZ,
Float:EntA,
UniqIntId,
InteriorName[128]
}