Page 1 of 1

foreach loop?

Posted: 19 Oct 2011, 16:33
by [FGS]Kalman
Hi!
I've got a problem. If I want to use the foreach allactors loop, it always says Call to 'AllActors' : Bad or missing parameter 2
This is the code:

Code: Select all

foreach AllActors(class'ChildMale', Childm)
		{
		Childm.EnterWorld();
		}
What is the problem?
Edit: I forgot to wrote, I set the local ChildMale Childm

Re: foreach loop?

Posted: 19 Oct 2011, 17:07
by ~][FGS][Nobody~
Is ChildMale a subclass of Actor?
Is your foreach class executed in a class that is a subclass of Actor?

Re: foreach loop?

Posted: 19 Oct 2011, 17:49
by [FGS]Kalman
ChildMale is a ScriptedPawn, and I want this in a missionscript, both is a subclass of Actor
But nvm, i reinstalled my sdk, it works now, idk what was the problem :/

Re: foreach loop?

Posted: 19 Oct 2011, 18:58
by [FGS]FlyingGhost
what language is that? c# java? ... ?

Re: foreach loop?

Posted: 19 Oct 2011, 18:58
by [FGS]FlyingGhost
what language is that? c# java? ... ?

Re: foreach loop?

Posted: 19 Oct 2011, 19:48
by ~][FGS][Nobody~
It was UnrealScript!

But yeah.. that reinstalling SDK solved the problem is weird tho..
It would have been interested to examine the issue. :o