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]);
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;
}
tesst[a][test][0] = xml_get_float(MAP, Pickstr[0]);
tesst[a][test][1] = xml_get_float(MAP, Pickstr[1]);
tesst[a][test][2] = xml_get_float(MAP, Pickstr[2]);
format(Pickstr[0], 128, "map/racepickup[%d]/@type", i); //integer
format(Pickstr[1], 128, "map/racepickup[%d]/@posX", i); //float
format(Pickstr[2], 128, "map/racepickup[%d]/@posY", i); //float
format(Pickstr[3], 128, "map/racepickup[%d]/@posZ", i); //float
new test[][aaaa] = {{1.0,2.0,3.0}, {2.0,3.0,4.0}}; //Might not be 100% valid...haven't touched pawn in like 3 years...
Wow, I am either really tired, or it is incredibly difficult to make sense of your arbitrary test naming/snippets lol. First thing is first, why is tesst's first dimension's size not set? I've generally only seen this when you are explicitly assigning something to it/filling it in...for example:
Код:
new test[][aaaa] = {{1.0,2.0,3.0}, {2.0,3.0,4.0}}; //Might not be 100% valid...haven't touched pawn in like 3 years... |
Second, what does "sizeof(tesst[])" print out? 1? I believe all your problems are rooted from you not declaring that first dimension's size (Could have created a constant like MAX_TESST for that, and used that constant instead of sizeof(PickAmount) and sizeof(tesst[]) too...making it a bit nicer).
|
0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 and so on ...