dom2d2
|
  |
| Joined: 11 Apr 2008 |
| Total Posts: 6397 |
|
|
| 28 Nov 2013 10:22 PM |
while true do for i = 1,60 do TimeValue.Value = TimeValue.Value + 1 print(TimeValue.Value)
if minutes == 0 then do finalamount = tostring(TimeValue.Value .. " seconds.") game.Workspace.RealTime.Value = finalamount wait(1) end elseif minutes == 1 then do finalamount = tostring(Minutes .. " minute, " .. TimeValue.Value .. " seconds.") game.Workspace.RealTime.Value = finalamount wait(1) end elseif minutes ~= 0 or 1 then do finalamount = tostring(Minutes .. " minutes, " .. TimeValue.Value .. " seconds.") game.Workspace.RealTime.Value = finalamount wait(1) end if TimeValue.Value == 60 then do Minutes = Minutes + 1 TimeValue.Value = 0 a=tostring("Minutes------> " .. Minutes) print(a) end
end
end end end
--Okay, the issue is, when I run it, it still says minutes and 0 when I both are irrelevant. Getting no output. |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2013 10:24 PM |
| elseif statements go inside the if statement and do not use ends to close them. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 28 Nov 2013 10:25 PM |
remove end after the if's
if x then elseif x then
not
if x then end elseif x then end |
|
|
| Report Abuse |
|
|
dom2d2
|
  |
| Joined: 11 Apr 2008 |
| Total Posts: 6397 |
|
|
| 28 Nov 2013 10:27 PM |
I did that, it says "end" expected to close "do" at line 10. It persists even if I add the ends at the end. |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2013 10:31 PM |
http://wiki.roblox.com/index.php/In-Depth_Scripting_Guide#The_.27elseif.27_Statement
This will help a bit with clearing out ends. |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2013 10:33 PM |
while true do for i = 1,60 do TimeValue.Value = TimeValue.Value + 1 print(TimeValue.Value)
if minutes == 0 then finalamount = tostring(TimeValue.Value .. " seconds.") game.Workspace.RealTime.Value = finalamount wait(1)
elseif minutes == 1 then finalamount = tostring(Minutes .. " minute, " .. TimeValue.Value .. " seconds.") game.Workspace.RealTime.Value = finalamount wait(1)
elseif minutes ~= 0 or 1 then finalamount = tostring(Minutes .. " minutes, " .. TimeValue.Value .. " seconds.") game.Workspace.RealTime.Value = finalamount wait(1) end
if TimeValue.Value == 60 then Minutes = Minutes + 1 TimeValue.Value = 0 a=tostring("Minutes------> " .. Minutes) print(a) end end end
|
|
|
| Report Abuse |
|
|
dom2d2
|
  |
| Joined: 11 Apr 2008 |
| Total Posts: 6397 |
|
|
| 28 Nov 2013 10:33 PM |
<--- I'm a wiki writer, I've already looked there. :| |
|
|
| Report Abuse |
|
|
Absurdism
|
  |
| Joined: 18 Jul 2013 |
| Total Posts: 2568 |
|
|
| 28 Nov 2013 10:34 PM |
| I'm loving this inefficiency. |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2013 10:35 PM |
| Wow, they really let anyone become a wiki writer.. |
|
|
| Report Abuse |
|
|
dom2d2
|
  |
| Joined: 11 Apr 2008 |
| Total Posts: 6397 |
|
|
| 28 Nov 2013 10:35 PM |
| I'm a newbie, I'm not going for efficient, I'm going for functional, in the least. |
|
|
| Report Abuse |
|
|
dom2d2
|
  |
| Joined: 11 Apr 2008 |
| Total Posts: 6397 |
|
|
| 28 Nov 2013 10:36 PM |
Yeah, they don't accept just anyone. Also, I didn't become a writer for scripting. :P The wiki isn't only scripting you know. |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2013 10:36 PM |
@Absurdism
I'd really love to be invited to Programmatic Sorcerers. *wink wink* |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2013 10:37 PM |
Wiki writer? Surely you know how scopes and else/elseif/if statements work then, right?
Do they let everybody be a wiki writer? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
dom2d2
|
  |
| Joined: 11 Apr 2008 |
| Total Posts: 6397 |
|
|
| 28 Nov 2013 10:39 PM |
Evolved, I'm only learning how to script. :{
Wiki Writer ~= scipter |
|
|
| Report Abuse |
|
|
| |
|
dom2d2
|
  |
| Joined: 11 Apr 2008 |
| Total Posts: 6397 |
|
|
| 28 Nov 2013 10:39 PM |
| Can you guys just help me out with this script? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 28 Nov 2013 10:41 PM |
how long have you been a writer, anyway
We gave you help, if elseif end
not if end elseif end |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2013 10:41 PM |
ur dang rite they arent scipters
ok ok, but go review over those rough edges or whatever you want to call them, they're very important. |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2013 10:41 PM |
'if TimeValue.Value == 60 then do'
if TimeValue.Value == 60 then
That's your problem. |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2013 10:42 PM |
| I just posted a hopefully fixed copy of your script up there a few minutes ago lol |
|
|
| Report Abuse |
|
|
dom2d2
|
  |
| Joined: 11 Apr 2008 |
| Total Posts: 6397 |
|
|
| 28 Nov 2013 10:43 PM |
| Okay, the ends in between them are moved, and I got with of the "do" after then. |
|
|
| Report Abuse |
|
|
| |
|
dom2d2
|
  |
| Joined: 11 Apr 2008 |
| Total Posts: 6397 |
|
|
| 28 Nov 2013 10:45 PM |
@evolved, yours didn't fix anything. The issue is I'm always getting the result as if minutes equaled more than 1. |
|
|
| Report Abuse |
|
|