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 » Game Design
Home Search
 

Re: Elseif not allowed: Newbie Scripter needs help with errors.

Previous Thread :: Next Thread 
PinkFlamess is not online. PinkFlamess
Joined: 29 Jun 2014
Total Posts: 9
23 Jul 2017 01:20 PM
Eyo! I've run into an error message that may or may not be the cause of my script not working. This is what I've got:

elseif cointype = Bronze, then coin = Brickcolor.new("Neon Orange")
elseif cointype = Silver, then coin = Brickcolor.new("Cloudy Gray")
elseif cointype = Gold, then coin = Brickcolor.new("Bright Yellow")
elseif cointype = Platinum, then coin = Br#####################h#######else coin = Brickcolor.new("Maroon")
end

This code is inside a "until true do" loop with other bits of code. The error messages I've been getting are "Expected 'eof', got 'elseif'" and (when I change the first elseif to just if) "expected 'then', got '='"############st line.

I was also wondering if two "until true loops" could be run in the same script, how _G variables work, and if end ends a loop

For more information on what this code is for it's a script that uses the time function and a lot of inequalities to create a rarity. This rarity determines the cointype of a coin block with varying points.

NOTE:I'm very new to coding and am probably putting too much on my plate, but that's how you learn, right?

Thanks for reading!
Report Abuse
Awesominat is not online. Awesominat
Joined: 13 Mar 2015
Total Posts: 22
23 Jul 2017 01:33 PM
elseif cointype == Bronze then
coin = Brickcolor.new("Neon Orange")
elseif cointype == Silver then
coin = Brickcolor.new("Cloudy Gray")
elseif cointype == Gold then
coin = Brickcolor.new("Bright Yellow")
elseif cointype == Platinum then
coin = Br#####################h#######
else
coin = Brickcolor.new("Maroon")
end

you must add 2 "==" when making if statements and commas arent needed


Report Abuse
PinkFlamess is not online. PinkFlamess
Joined: 29 Jun 2014
Total Posts: 9
23 Jul 2017 02:16 PM
Yay! Now everything's nice and blue! Now my only problem is fixing all the global variables (which I also unfortunately have no idea how to do) But I made progress, so thank you for that! :D
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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