Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Next without for compile error.......
#1
this is pissing me off. is there a fix for this code at all because the next at the end keep saying next without for and when i take them out i have to keep adding end if to the end of the sub but it never stops weird.

Code:
' //////////////////////////////////////
                ' // This is used for spawning an NPC //
                ' //////////////////////////////////////
                ' Check if we are supposed to spawn an npc or not
                If MapNpc(y, x).Num = 0 And Map(y).Npc(x) > 0 Then
                    If TickCount > MapNpc(y, x).SpawnWait + (Npc(Map(y).Npc(x)).SpawnSecs * 1000) Then
                        Call SpawnNpc(x, y)
                    End If
                End If
            Next x
        End If
        DoEvents
    Next y


this is the part causing the problems

Code:
Next x

thank you for your help.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)