Hello, I'm getting compilation error when I do this (array sizes do not match, or destination array is too small)
Code:
enum _:eVectors
{
Float:ORIGIN[3],
Float:ANGLES[3],
};
public something(pPlayer)
{
new stVector[eVectors];
ArrayGetArray(g_arrSpawns, random(ArraySize(g_arrSpawns)), stVector);
entity_set_vector(pPlayer, EV_VEC_origin, stVector[ORIGIN]);
entity_set_vector(pPlayer, EV_VEC_origin, stVector[ANGLES]);
}
I know I can simply do this:
Code:
enum _:eVectors
{
Float:ORIGIN[3],
Float:ANGLES[3],
};
public something(pPlayer)
{
new stVector[eVectors], Float:vecOrigin[3], Float:vecAngles[3];
ArrayGetArray(g_arrSpawns, random(ArraySize(g_arrSpawns)), stVector);
vecOrigin[0] = stVector[ORIGIN][0];
vecOrigin[1] = stVector[ORIGIN][1];
vecOrigin[2] = stVector[ORIGIN][2];
vecAngles[0] = stVector[ANGLES][0];
vecAngles[1] = stVector[ANGLES][1];
vecAngles[2] = stVector[ANGLES][2];
entity_set_vector(pPlayer, EV_VEC_origin, vecOrigin);
entity_set_vector(pPlayer, EV_VEC_origin, vecAngles);
}
But I want to know if it's possible to do WITHOUT create another two vectors and add to them.
__________________