Hey there, cheers for the reply.
The above is sort of what I'd fathomed out already. What I dont understand is line one, and what runelements equals on line one? What do the multiple values enclosed by parenthesis do?
What would the size of runelements be therefore? And what does sizeof(uint32) give? 32?
If it makes sense, understand my reasoning; Im trying to follow the process through numerically in my head to make sense of it and in order to do that I need to know what the values of some of these things are.
How else can I make this easier... hmm.
Would this be equivalent code for example then?
1 2 3 4 5
|
const uint32 runelements= {20, 21, 22};
bool RunnerScript::FunctionFive()
{
RegisterElements(20, 21, 22[3]);
}
|
Or... hold on...
Could I change it to this:
1 2 3 4 5 6 7 8 9
|
const uint32 runelements= {200, 210, 220, 230};
bool RunnerScript::FunctionFive()
{
for(uint8 int i = 0; i < (sizeof(runelements) / sizeof(uint32)); i++)
{
RegisterElements(runelements[i]);
}
return true;
}
|
And the code still function properly but instead with different identifiers for the elements and with an array of size four this time?
If I understand correctly, the purpose of the loop is to make it so that no matter how many different "runelements" values there are declared by the const; each of them gets registered by the function and stored into an array of exact size (the size being exactly the number of "runelements" values that were originally declared?).
Thank you very much so far, think I'm a little closer to being happy with my understanding.