fatcat567
|
  |
| Joined: 01 Feb 2011 |
| Total Posts: 14 |
|
|
| 19 Nov 2012 11:36 PM |
x=1 do x=y+0 converts form y to x if x < 20 checks if its lower than 20 then y=1+x adds 1 print 'y' prints the number else y=x-20 if its higher than 20 subtract 20 goto do go to "do" end end of code segment end end of whole code
it says = expected near and but when i put it there it says unexpected symbol near end |
|
|
| Report Abuse |
|
|
|
| 19 Nov 2012 11:41 PM |
| lua does not support goto and you have forgot to comment some part of the lines, that breaks the script |
|
|
| Report Abuse |
|
|
fatcat567
|
  |
| Joined: 01 Feb 2011 |
| Total Posts: 14 |
|
|
| 19 Nov 2012 11:43 PM |
i added those to tel the readers what it is, its not in the script
|
|
|
| Report Abuse |
|
|
fatcat567
|
  |
| Joined: 01 Feb 2011 |
| Total Posts: 14 |
|
|
| 19 Nov 2012 11:44 PM |
x=1 do x=y+0 if x < 20 then y=1+x print 'y' else y=x-20 goto 'do' end end
real code |
|
|
| Report Abuse |
|
|
|
| 20 Nov 2012 01:07 AM |
Still lua does not support goto
working code: x=1 y=0 function Do() wait() x=y+0 if x < 20 then y=1+x print 'y' else y=x-20 Do() end end Do() |
|
|
| Report Abuse |
|
|
|
| 20 Nov 2012 08:22 AM |
Roblox is currently not running on Lua 5.2, only on Lua 5.1 due to some issues.
Therefore, goto is currently not functional at the moment being. |
|
|
| Report Abuse |
|
|