02.12.2013, 05:56
I have this code;
All values from xml_get_float are saved into tesst[a][test][0/1/2] variables perfectly(around 60 values). But when I wanted to use the variables;
It only loads 1 value instead of 60~.
pawn Код:
enum aaaa
{
Float:test[3]
}
new tesst[][aaaa];
for(new i = 0; i < PicksCount; i++)
{
format(Pickstr[0], 128, "map/racepickup[%d]/@type", i);
format(Pickstr[1], 128, "map/racepickup[%d]/@posX", i);
format(Pickstr[2], 128, "map/racepickup[%d]/@posY", i);
format(Pickstr[3], 128, "map/racepickup[%d]/@posZ", i);
for(new a = 0; a < sizeof(tesst[]); a++)
{
tesst[a][test][0] = xml_get_float(MAP, Pickstr[1]);
tesst[a][test][1] = xml_get_float(MAP, Pickstr[2]);
tesst[a][test][2] = xml_get_float(MAP, Pickstr[3]);
// printf("%0.4f, %0.4f, %0.4f", tesst[a][test][0], tesst[a][test][1], tesst[a][test][2]);
pawn Код:
public PickUps() //SetTimer
{
for(new a = 0; a < sizeof(PickAmount); a++)
{
// printf("%0.4f, %0.4f, %0.4f", tesst[a][test][0], tesst[a][test][1], tesst[a][test][2]);
}
return 1;
}