Y_INI crashes my compiler? -
rubygta - 24.06.2014
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.
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);
}
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.
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;
}
Thank you in advance!
Re: Y_INI crashes my compiler? -
Dziugsas - 24.06.2014
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);
}
try
Re: Y_INI crashes my compiler? -
rubygta - 24.06.2014
Quote:
Originally Posted by Dziugsas
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); }
try
|
Nope

It still crashes.. Like I said, it's the Y_INI part, because if I add CreateVehicleEx(); without the y_ini, it compiles but of course doesn't do anything.
Re: Y_INI crashes my compiler? -
rubygta - 24.06.2014
Should I be using INI_Open, or INI_ParseFile? Could that be an issue? Also, I tried searching for a personal vehicle system for Y_INI but I don't tihnk there is a tutorial about it? Anyway, if anyone knows another way to more effectively make this system, then I would appreciate any suggestions, because this doesn't seem to work at all.