State label problem

So I learned about states today, just so I could use one latent function (MoveTo()) for NPC movement in MP. There're probably ways of doing this already, but I thought coding my own path nodes would be quicker / easier and would probably be less trouble on MP too, seeing as I can't find anything on it anywhere.
I'm pretty sure I understand states now, but it won't let me compile this:
for this reason:
Was I wrong assuming that I can just declare new labels? Or have I done something really silly?
I'm pretty sure I understand states now, but it won't let me compile this:
- Code: Select all
State Patrolling
{
function GetMoving()
{
foreach AllActors(class'CozPath',cpa)
{
if(cpa.PathName == PathName)
{
if(cpa.PathPoint == PathPoint)
{
goto 'LabelMove';
}
}
}
}
//Long irrelevant stuff here
LabelMove:
if(cpa != none)
{
MoveToward(cpa);
}
}
for this reason:
Error, Label 'LabelMove' not found in this block of code.
Was I wrong assuming that I can just declare new labels? Or have I done something really silly?