MsMike999
|
  |
| Joined: 23 Jun 2010 |
| Total Posts: 7631 |
|
|
| 10 Jul 2011 01:33 PM |
m = script.Parent.Sound p = script.Parent.Sound.Pitch s = script.Parent.Parent.Speed.Value ------------------------------------------- m:Play()
while do true p = s end
The output window said: unexpected symbol near 'do' |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2011 01:34 PM |
Change it to while true do
But that script is gonna crash you anyway, so be careful :P |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2011 01:34 PM |
while true do, not while do true.
:33333333333333333333333333333333333333333333333333333333 |
|
|
| Report Abuse |
|
|
MsMike999
|
  |
| Joined: 23 Jun 2010 |
| Total Posts: 7631 |
|
|
| 10 Jul 2011 01:36 PM |
@Dr How do I fix it so it doesn't? |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2011 01:36 PM |
Add a wait. While true do makes it repeat forever and ever, and without a wait it will go so fast that it crashes.
Try doing something like
while true do --do your stuff wait(1) end |
|
|
| Report Abuse |
|
|
Uberself
|
  |
| Joined: 08 Jul 2011 |
| Total Posts: 3 |
|
|
| 10 Jul 2011 01:40 PM |
m = script.Parent.Sound p = script.Parent.Sound.Pitch s = script.Parent.Parent.Speed.Value ------------------------------------------- m:Play()
while true do p = s end |
|
|
| Report Abuse |
|
|
Flurite
|
  |
| Joined: 03 Apr 2011 |
| Total Posts: 5386 |
|
|
| 10 Jul 2011 01:47 PM |
Instead of adding ANOTHER line, you can be cool, and do..
while wait() do --code end |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2011 01:48 PM |
"Instead of adding ANOTHER line, you can be cool, and do.."
Not only is that method frowned upon, it will put a small delay before the code executes, where he may prefer it to be afterward. |
|
|
| Report Abuse |
|
|
MsMike999
|
  |
| Joined: 23 Jun 2010 |
| Total Posts: 7631 |
|
|
| 10 Jul 2011 01:54 PM |
| Also, that "P = s" isnt working. |
|
|
| Report Abuse |
|
|
| |
|
|
| 10 Jul 2011 01:56 PM |
| Oh, I misread. ignore my last post |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2011 01:58 PM |
"Not only is that method frowned upon"
I'm not sure it's really frowned upon. Since wait() returns values, it still treats it like 'true,' while also giving you that delay. As you said, it wouldn't always be good to use it in some scenarios, but it isn't wrong to use. |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2011 02:11 PM |
"I'm not sure it's really frowned upon. Since wait() returns values, it still treats it like 'true,' while also giving you that delay."
I've met multiple people who say that it is indeed bad coding. While yes, it does return values, wait is not meant to be used like that, as it could change in the future. |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2011 08:37 PM |
| Yes, I would never code that way, however I personally don't think it matters :P |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2011 08:47 PM |
while true do with no wait crashes your computer, or so I heard. So yah, while wait() do |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2011 08:50 PM |
@Flurite
You stole my trick... |
|
|
| Report Abuse |
|
|