jd678
|
  |
| Joined: 18 Apr 2008 |
| Total Posts: 11529 |
|
|
| 10 Aug 2012 03:20 PM |
For say i am doing an if function.
while true do wait(0.1) if blahblah.Health == 50 then blahblah.Health = 100 else if blahblah.Health == 100 then return? what do i do here if the "if" isn't true end end end |
|
|
| Report Abuse |
|
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
|
| 10 Aug 2012 03:21 PM |
What? Do you mean else?
while true do if (blahblah.Health == 50) then print("Is 50") elseif (blaahblah.Health == 100) then print("Is 100") else print("Is neither 50 or 100"); end end |
|
|
| Report Abuse |
|
|
jd678
|
  |
| Joined: 18 Apr 2008 |
| Total Posts: 11529 |
|
|
| 10 Aug 2012 03:25 PM |
your scripting style confuses me ,-,
i think mine is just sloppy
PewDiePie *Brofist* / Got Ice crown!! :D |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 03:27 PM |
DO NOT PUT A SPACE BETWEEN ELSE AND IF! >:O Else and if are two diff. things!! Use elseif. |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 03:28 PM |
And when you do what I said above, Remove one end. :P |
|
|
| Report Abuse |
|
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
|
| 10 Aug 2012 03:29 PM |
@Zackery: You can put a space, but you need to put another end.
if (statement1) then -- else if (statement2) then -- end end
(Though if you're using other languages like Java or C++, it's "else if") |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 03:30 PM |
I know. I just wanted to teach him to use elseif for that stuff. Or just use:
else --BLAH |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 03:31 PM |
What is blahblah?
while true do wait(0.1) if blahblah.Health == 50 then blahblah.Health = 100 else return end end
~repeat wait() until script.Parent:HasALife() |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 03:34 PM |
@Thedeath, He's not USING that script. That was just an example for us so we know what he wants us to tell him. Geez. And HasALife() is not a Method. >:) |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 03:37 PM |
| It could be a custom method. Who knows. |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 03:40 PM |
How do you make.... a 'Custom' method? Do you mean like a function? o.o' |
|
|
| Report Abuse |
|
|