Problem with LoadVehicle(filename[256]); -
JaKe Elite - 26.06.2012
i have problem on this line
pawn Код:
LoadVehicle(filename[256])
{
CreateVehicleEx(dini_Int(filename, "Model"), dini_Float(filename, "XSpawn"), dini_Float(filename, "YSpawn"), dini_Float(filename, "ZSpawn"), dini_Float(filename, "AngSpawn"), dini_Int(filename, "Col1"), dini_Int(filename, "Col2"), dini_Int(filename, "Respawn"), dini_Get(filename, "Owner")); //i get error when i add dini_Get
}
the error is
Код:
array sizes do not match, or destination array is too small
how to fix it?
Re: Problem with LoadVehicle(filename[256]); -
JaKe Elite - 26.06.2012
Bump.
Re: Problem with LoadVehicle(filename[256]); -
Grand_Micha - 26.06.2012
pawn Код:
LoadVehicle(filename[256])
{
CreateVehicleEx(dini_Int(filename, "Model"), dini_Float(filename, "XSpawn"), dini_Float(filename, "YSpawn"), dini_Float(filename, "ZSpawn"), dini_Float(filename, "AngSpawn"), dini_Int(filename, "Col1"), dini_Int(filename, "Col2"), dini_Int(filename, "Respawn"), dini_Get(filename, "Owner")); //i get error when i add dini_Get
}
Nobody will be able to help you if you do not tell us what the damn "CreateVehicleEx" is. It is OBVIOUSLY not from the standard includes.
Re: Problem with LoadVehicle(filename[256]); -
aRoach - 26.06.2012
pawn Код:
LoadVehicle(filename[ ])
{
CreateVehicleEx(dini_Int(filename, "Model"), dini_Float(filename, "XSpawn"), dini_Float(filename, "YSpawn"), dini_Float(filename, "ZSpawn"), dini_Float(filename, "AngSpawn"), dini_Int(filename, "Col1"), dini_Int(filename, "Col2"), dini_Int(filename, "Respawn"), dini_Get(filename, "Owner")); //i get error when i add dini_Get
}
Re: Problem with LoadVehicle(filename[256]); -
JaKe Elite - 26.06.2012
pawn Код:
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;
}
EDIT:
aRoch
it didn't fix it.
Re: Problem with LoadVehicle(filename[256]); -
Grand_Micha - 26.06.2012
pawn Код:
carData[carid][owner] = ownername;
Is that part of an enum? In any case:
pawn Код:
format(carData[carid][owner],MAX_PLAYER_NAME,"%s",dini_Get(filename,"Owner"));
Re: Problem with LoadVehicle(filename[256]); -
MadeMan - 26.06.2012
pawn Код:
LoadVehicle(filename[256])
{
new ownername[MAX_PLAYER_NAME];
strmid(ownername, dini_Get(filename, "Owner"), 0, sizeof(ownername));
CreateVehicleEx(dini_Int(filename, "Model"), dini_Float(filename, "XSpawn"), dini_Float(filename, "YSpawn"), dini_Float(filename, "ZSpawn"), dini_Float(filename, "AngSpawn"), dini_Int(filename, "Col1"), dini_Int(filename, "Col2"), dini_Int(filename, "Respawn"), ownername);
}
Re: Problem with LoadVehicle(filename[256]); -
JaKe Elite - 28.06.2012
Cannot rep you anymore...