NikB
|
  |
| Joined: 13 May 2009 |
| Total Posts: 2478 |
|
|
| 02 Feb 2012 05:15 PM |
repeat Nv = Instance.new("NumberValue") Nv.value = Nv.value + 1 until (Nv.value == 8) then print("It stops at 8") end
from
http://wiki.roblox.com/index.php/Basic_Scripting#Repeat_loops
Doing that loop would constantly be making new numbervalues, basically crashing the game...... awks |
|
|
| Report Abuse |
|
|
Aaaboy97
|
  |
| Joined: 05 Apr 2009 |
| Total Posts: 6612 |
|
|
| 02 Feb 2012 05:17 PM |
| Fixed, but it needs to be reviewed first |
|
|
| Report Abuse |
|
|
|
| 02 Feb 2012 05:18 PM |
*facepalm*
This is just an example of repeat loops. It doesnt really matter if it would crash the game or not, your not supposed to copy+paste all the scripts you find on the wiki. |
|
|
| Report Abuse |
|
|
NikB
|
  |
| Joined: 13 May 2009 |
| Total Posts: 2478 |
|
|
| 02 Feb 2012 05:20 PM |
*facepalm*
All the scripts from the wiki should still work. This is sort of misleading, and the wiki is designed to help new players, and teaching someone to do something by using a broken version doesn`t really work. It`s like teaching someone how to hammer a nail with a broken hammer. |
|
|
| Report Abuse |
|
|
| |
|
NikB
|
  |
| Joined: 13 May 2009 |
| Total Posts: 2478 |
|
|
| 02 Feb 2012 05:23 PM |
| Enum, I was going to say that but I expect him to say something stupid like "WELL DEN N00BS SHUD BE LIEK BETER" |
|
|
| Report Abuse |
|
|
|
| 02 Feb 2012 05:28 PM |
| dude you have the number instance creation WITHIN the loop. Thats probably why its not working because your creating number instances every single loop. |
|
|
| Report Abuse |
|
|
| |
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 02 Feb 2012 07:24 PM |
"This is just an example of repeat loops. It doesnt really matter if it would crash the game or not"
No, it matters because it isn't even correctly written, it would error before it crashed the game.
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 02 Feb 2012 07:29 PM |
"repeat Nv = Instance.new("NumberValue") Nv.value = Nv.value + 1 until (Nv.value == 8) then print("It stops at 8") end"
Wouldn't it be more easy to demonstrate this through variables, instead of objects?
local a=0 repeat a=a+1 until a==8 -- While a is not 8, a=a+1 print("The loop stops because a is equal to 8")
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
Sorcus
|
  |
 |
| Joined: 29 Nov 2010 |
| Total Posts: 3775 |
|
|
| 02 Feb 2012 07:31 PM |
This forum is not for posting wiki issues. PM a writer or an Admin.
~Sorcus |
|
|
| Report Abuse |
|
|