27.06.2012, 16:03
I'm making a function to create vehicle spawnpoints, which will store multiple (up to 50) models that may appear at said spawnpoint to randomize it a bit.
stock CreateVehicleSpawn(models[], Float:x, Float:y, Float:z, Float:angle, color1, color2)
models is a string of models like "400 401 402". I'm using the sscanf array specifier to process it:
But it is printing the
[WARNING] A static vehicle has a corrupt model format and won't be created.
error.
Any ideas why? This is the function that causes the warning above:
CreateVehicleSpawn("411 403 522", 0.0, 0.0, 3.0, 0.0, -1, -1);
I also printed out the string passed, and as you can see it's fine:
[17:16:50] 411 403 522
[17:16:50] [WARNING] A static vehicle has a corrupt model format and won't be created.
stock CreateVehicleSpawn(models[], Float:x, Float:y, Float:z, Float:angle, color1, color2)
models is a string of models like "400 401 402". I'm using the sscanf array specifier to process it:
pawn Код:
stock CreateVehicleSpawn(models[], Float:x, Float:y, Float:z, Float:angle, color1, color2)
{
new model[50];
if(sscanf(models, "a<i>[50]", model)) return print("[WARNING] A static vehicle has a corrupt model format and won't be created.");
[WARNING] A static vehicle has a corrupt model format and won't be created.
error.
Any ideas why? This is the function that causes the warning above:
CreateVehicleSpawn("411 403 522", 0.0, 0.0, 3.0, 0.0, -1, -1);
I also printed out the string passed, and as you can see it's fine:
[17:16:50] 411 403 522
[17:16:50] [WARNING] A static vehicle has a corrupt model format and won't be created.