generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

how doesnt this work?

Previous Thread :: Next Thread 
fatcat567 is not online. 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
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
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 is not online. 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 is not online. 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
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
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
CloneTrooper1019 is not online. CloneTrooper1019
Joined: 19 Jan 2009
Total Posts: 6227
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image