Functions inside loops don't seem to work?
by Danilo Buendia · in Torque X 2D · 10/25/2009 (4:46 am) · 1 replies
I'm trying to run a function in a loop in another function, but it only seems to work for the first iteration.
In this example, the AdvancedRandom() only works on the first iteration.
ANy clues?
In this example, the AdvancedRandom() only works on the first iteration.
string targetword = "01";
for (int x = 0; x < 8; x++)
{
tempLetter = AdvancedRandom();
tempword = String.Concat(targetword , tempLetter);
targetword = tempword;
}ANy clues?
Torque Owner Randy Lutcavich
Are you sure it is only calling it once?
Because with that for loop it will be called 8 times really fast.