24.06.2014, 12:53
(
Последний раз редактировалось rubygta; 24.06.2014 в 14:31.
)
Hey, there. I'm currently working on a vehicles system that saves/loads my vehicles from a .ini file. I'm kind of following a tutorial where pseudo(??) is being used and I'm trying to make it using Y_INI. The problem is that when I add a certain line to my code, my compiler implodes.
Here's my stock function.
If I comment out that line, it compiles OK but obviously doesn't do anything..
I assume there's little help in posting the CreateVehicleEx here, but I'll do so just in case.
Thank you in advance!
Here's my stock function.
pawn Код:
stock LoadVehicle(filename[36])
{
new INI:File = INI_Open(vehiclePATH(filename));
CreateVehicleEx(INI_Int(File, "Model"), INI_Float(File, "XSpawn"), INI_Float(File, "YSpawn"), INI_Float(File, "SpawnAngle", INI_Int(File, "Color1"), INI_Int(File, "Color2"),INI_Int(File, "RespawnTime"), INI_String(File, "Owner");
INI_Close(File);
}
I assume there's little help in posting the CreateVehicleEx here, but I'll do so just in case.
pawn Код:
stock CreateVehicleEx(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawntime, ownername[MAX_PLAYER_NAME])
{
new carid = GetFreeVehicleSlot();
carData[carid][model] = modelid;
carData[carid][xspawn] = x;
carData[carid][yspawn] = y;
carData[carid][zspawn] = z;
carData[carid][anglespawn] = angle;
carData[carid][col1] = color1;
carData[carid][col2] = color2;
carData[carid][respawn] = respawntime;
carData[carid][owner] = ownername;
validcar[carid] = true;
CreateVehicle(modelid, x, y, z, angle, color1, color2, respawntime);
return carid;
}
