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
 

Re: Workspace.RaiderWin:9: '<​eof>' expected near 'end'

Previous Thread :: Next Thread 
Alexrocksdude is not online. Alexrocksdude
Joined: 19 Jan 2011
Total Posts: 3828
07 Dec 2012 11:38 AM
fiveDigitNum = ""
for i = 1 , 6 do
fiveDigitNum = fiveDigitNum .. math.random ( 9 )
end

Message = Instance.new("Message")
Message.Parent = game.Workspace
Message.Text = "The Raiders have won, T.R.F.E. has lost! Shutting down, leave to save items and Credits. RAID ID: " .. fiveDigitNum.."!"
end)
game:GetService("Debris"):AddItem(Message, 30)
wait(30)
while true do end


What's wrong with it? All that it prints is; Workspace.RaiderWin:9: '<​eof>' expected near 'end'

Perfection is not attainable, but if we chase perfection we can catch excellence.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
07 Dec 2012 11:48 AM
So... many... errors...


fiveDigitNum = ""
for i = 1 , 6 do
fiveDigitNum = fiveDigitNum..math.random(1, 9)
end

Message = Instance.new("Message")
Message.Parent = game.Workspace
Message.Text = "The Raiders have won, T.R.F.E. has lost! Shutting down, leave to save items and Credits. RAID ID: " .. fiveDigitNum.."!"
game:GetService("Debris"):AddItem(Message, 30)
wait(30)
while true do end


Unless that isn't the whole script this should fix it.
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
07 Dec 2012 02:25 PM
@Destroyer

To be honest there weren't any errors to start.. if anything you made it worse.

And that is not how to shut down a server, really.
Report Abuse
crouton04 is not online. crouton04
Joined: 07 Jul 2010
Total Posts: 4459
07 Dec 2012 02:30 PM
Bunny, destroyer didn't make it worse... He fixed the error in math.random.. You're an idiot..
Report Abuse
Treshold is not online. Treshold
Joined: 01 Aug 2012
Total Posts: 109
07 Dec 2012 02:38 PM
Only error in that script is the unnecessary "end)". Just remove it (or use Destroyers) and continue on.


As a question, why are you calling it "fiveDigitNum" when you're making it 6 digits long?
Report Abuse
Alexrocksdude is not online. Alexrocksdude
Joined: 19 Jan 2011
Total Posts: 3828
07 Dec 2012 02:48 PM
Because it SHOULD have been 5, lol.

Perfection is not attainable, but if we chase perfection we can catch excellence.
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
07 Dec 2012 03:47 PM
You are the idiot for not knowing math.random only needs 1 argument.
Report Abuse
xXTheRobotXx is not online. xXTheRobotXx
Joined: 05 May 2012
Total Posts: 13343
07 Dec 2012 03:50 PM
@Bunny

That statement is incorrect.

Error 407:["Siggy.exe not found."] Please try again in a few moments.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
07 Dec 2012 03:50 PM
Bunny is correct. Don't be rude though.

- thedestroyer115
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
07 Dec 2012 03:50 PM
Read the wiki:

http://wiki.roblox.com/index.php/Math.random
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
07 Dec 2012 03:52 PM
@Bunny
OP originally posted:


fiveDigitNum = ""
for i = 1 , 6 do
fiveDigitNum = fiveDigitNum .. math.random ( 9 )
end

Message = Instance.new("Message")
Message.Parent = game.Workspace
Message.Text = "The Raiders have won, T.R.F.E. has lost! Shutting down, leave to save items and Credits. RAID ID: " .. fiveDigitNum.."!"
end)
game:GetService("Debris"):AddItem(Message, 30)
wait(30)
while true do end


You say that I fixed no errors when I removed the random end)?

- thedestroyer115
Report Abuse
crouton04 is not online. crouton04
Joined: 07 Jul 2010
Total Posts: 4459
07 Dec 2012 04:04 PM
Math.random needs 2.. 1,9 to get all numbers through 1 and 9.. :p
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
07 Dec 2012 04:05 PM
fiveDigitNum = ""
for i = 1 , 6 do
fiveDigitNum = fiveDigitNum .. tostring(math.random ( 9 ) )
end

Message = Instance.new("Message")
Message.Parent = game.Workspace
Message.Text = "The Raiders have won, T.R.F.E. has lost! Shutting down, leave to save items and Credits. RAID ID: " .. fiveDigitNum.."!"
end)
game:GetService("Debris"):AddItem(Message, 30)
wait(30)
while true do end
Report Abuse
Willingroblox123 is not online. Willingroblox123
Joined: 18 Jan 2010
Total Posts: 6872
07 Dec 2012 04:10 PM
fiveDigitNum = ""
for i = 1 , 6 do
fiveDigitNum = fiveDigitNum .. tostring(math.random ( 9 ))
end

Message = Instance.new("Message")
Message.Parent = game.Workspace
Message.Text = "The Raiders have won, T.R.F.E. has lost! Shutting down, leave to save items and Credits. RAID ID: " .. fiveDigitNum.."!"
game:GetService("Debris"):AddItem(Message, 30)
wait(30)
while true do end


There, should be fixed.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
07 Dec 2012 04:14 PM
You just copied rendersettings, lol.

- thedestroyer115
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
07 Dec 2012 04:15 PM
He actually fixed the end) which I forgot about. That would need for the text to be either single-lined or in [[]]'s instead of ""'s for it to work.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
07 Dec 2012 04:18 PM
Mhmm.

Report Abuse
Alexrocksdude is not online. Alexrocksdude
Joined: 19 Jan 2011
Total Posts: 3828
07 Dec 2012 04:21 PM
It's fixed, thanks...

Perfection is not attainable, but if we chase perfection we can catch excellence.
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
07 Dec 2012 10:03 PM
Sorry destroyer I didn't see that. But saying "so many errors..." was exaggerated.

And math.random works with only one argument as well! Get informed before making accusations!
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
07 Dec 2012 10:37 PM
You could just do...

math.random(11111,99999) for your "five digit number" ?
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
08 Dec 2012 12:27 PM
BunnyBoy, I never made any accusations about math.random, did I? :)

- thedestroyer115
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
08 Dec 2012 05:41 PM
I'm not saying that to you.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
11 Sep 2013 01:24 PM
You have embarrassed yourself by bumping this 1+ year old post.

Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
11 Sep 2013 01:27 PM
I'm confused, you're the only one on the thread who posted this year
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
11 Sep 2013 01:31 PM
Great.

A 'post blocked' bump.

Trollers do that.

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