Mirage Source http://web.miragesource.net/forums/ |
|
Next without for compile error....... http://web.miragesource.net/forums/viewtopic.php?f=201&t=2333 |
Page 1 of 2 |
Author: | genusis [ Mon Jul 23, 2007 12:17 pm ] |
Post subject: | Next without for compile error....... |
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. |
Author: | Robin [ Mon Jul 23, 2007 12:32 pm ] |
Post subject: | Re: Next without for compile error....... |
Oh lawd. *cough* You've fucked up one of your fucking if, when, whiles or loops. Well done. Now go through your fucking code and actually read whats going on. This is why some people fucking indent their fucking code! So you can actually find out whats wrong with the fucking thing, ok? The broken if, when, while or loop is somewhere before your "while x = fuck" and before your "next x". Go look for it instead of annoying us with this fucking fucking problem. |
Author: | genusis [ Mon Jul 23, 2007 1:30 pm ] |
Post subject: | Re: Next without for compile error....... |
well that was a little uncalled for. well thank you for helping me robin, i was so lost in what i was doing i forgot what i did to the loop lol. |
Author: | Robin [ Mon Jul 23, 2007 2:10 pm ] |
Post subject: | Re: Next without for compile error....... |
IMHO I don't think it was. If you're going to ask us about the basics of the basics of code structure, at least use proper English. |
Author: | bhenhur [ Mon Jul 23, 2007 2:57 pm ] |
Post subject: | Re: Next without for compile error....... |
genusis wrote: this is pissing me off. is there a fixe for this code at all becuase the nexts 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 wierd. Who, when, wha?? . People are not going to take you seriously if you don't put some effort into explaining yourself. I am not a great speller, so i use Firefox as my browser, it has spell check. |
Page 1 of 2 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |