I believe you need an "/" before code in the last [ code]
like so
[/code]
-------------------------
I really need to know what your script will do (in essence) to help you further mate...
You aren't being very informative.
'>
Anyway, it's best to use GetNearestObjectByTag(oArea, "thistag", #);
Then use a For Loop to suppliment the # using the i Integer...
e.g.
object oArea =
?; ///Define oArea...
int nWhich = 11; // (e.g. 1 - 10)
int i;
for(i=1; i<nWhich;i++)
{
oSomething = GetNearestObjectByTag(oArea, "thistag", i);
}
Obviously nWhich would need to be the # of objects you want to look at (Plus 1), if you are wanting to look at them all, then enter that number plus one, e.g. if 20 put nWhich = 21;
Otherwise yes, you
may be able to use the while loop as you shew above...
However you have an error in that script, as you are using "GetObjectByTag(sTag)" in the actual definition of oObject.... which GetObjectByTag(sTag) is a loop in itself, so it would kick out an error...
If you want to use a double loop, then write a custom function / prototype to do another loop once oObject has been defined by the first loop, this should prevent the TMI (Too Many Instructions) error, but that's NOT guaranteed.
I could probably help you a lot more if I knew exactly what you were trying to achieve, ultimately..
Modifié par _Guile, 21 mai 2012 - 08:30 .