|
| 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 |
|
|
| 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 |
|
|
| 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 |
|