|
| 29 Mar 2014 06:14 PM |
I will now write a code, making it EXTREMELY long. Shortest improvement wins!
Values = {"Just to mess it up a little..."}
while true do AAA = math.random(math.random(5, 20), math.random(6, 22)) BBB = math.random(math.random(5, 20), math.random(6, 22))
AA = math.random(AAA, AAA * 2) repeat BB = math.random(BBB, BBB * 2) until BB > AA
A = math.random(AA, BB) B = math.random(AA, BB)
table.insert(Values, AAA) table.insert(Values, BBB) table.insert(Values, AA) table.insert(Values, BB) table.insert(Values, A) table.insert(Values, B)
for I = 1,#Values do Ammount = 0 repeat Ammount = Ammount + 1 print(Values[I]) print(Values[I]) print(Values[I]) print(Values[I]) print(Values[I]) until Ammount == 5 end
for I = 1,#Values do print(Values) table.remove(Values, I) print(Values) end end
Bonus points if you make it a one liner!!! |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 06:36 PM |
| Well I figured someone would know... |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 06:38 PM |
| I don't know what it is supposed to do. |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 06:40 PM |
and you could easily make this a one liner. i.e
while true do local p = Instance.new('Part', Workspace) wait() end
is the same as
while true do local p = Instance.new('Part', Workspace) wait() end
#nerdsunited |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 06:41 PM |
@verified that has nothing to do with my question.
Also, 2 posts above, plug the script in studio and find out |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 06:42 PM |
"Bonus points if you make it a one liner!!!"
uwotm8
#nerdsunited |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 06:42 PM |
V = {} repeat a = math.random(6,777) b = math.random(6,50) table.insert(V,b) table.insert(V,a) until a-b<100 for I,v in pairs(V) do print (I,v) end
I have no idea what ur doing,but is this the idea?? |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 06:44 PM |
| the purpose of this is unclear. |
|
|
| Report Abuse |
|
|
Rethiux
|
  |
| Joined: 14 Nov 2012 |
| Total Posts: 1132 |
|
|
| 29 Mar 2014 06:46 PM |
game.Workspace:ClearAllChildren()
(You asked for the shortest script, not related to yours.)
-Stravus Police Department- (C) Commissioner :: Join today! |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 06:48 PM |
Values = {"Just to mess it up a little..."} while true do AAA = math.random(math.random(5, 20), math.random(6, 22)) BBB = math.random(math.random(5, 20), math.random(6, 22)) AA = math.random(AAA, AAA * 2) repeat BB = math.random(BBB, BBB * 2) until BB > AA A = math.random(AA, BB) B = math.random(AA, BB) table.insert(Values, AAA) table.insert(Values, BBB) table.insert(Values, AA) table.insert(Values, BB) table.insert(Values, A) table.insert(Values, B) for I = 1,#Values do Ammount = 0 repeat Ammount = Ammount + 1 print(Values[I]) print(Values[I]) print(Values[I]) print(Values[I]) print(Values[I]) until Ammount == 5 end for I = 1,#Values do print(Values) table.remove(Values, I) print(Values) end end
there, that is a one liner.
#nerdsunited |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 06:49 PM |
*kinda restarts*
How bout a .Chatted function?I'm sure we ALL like those..
Ill make a REALLY long one,and whoever makes shortest..
Well,yknow
DesiredMsg = "hello world!" function MsgSent(Message,p) msg = Message:lower() if msg == DesiredMsg then Msg = Instance.new("Message") Msg.Parent = Workspace Name = p.Name Mess = msg Msg.Text = (""..Name..":"..Mess.."") end end
function PlayerJoined(plr) plr.Chatted:connect(function(msg) MsgSent(msg,plr) end) end
game.Players.ChildAdded:connect(PlayerJoined)
Its easy to simplify,but,currently long |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 06:49 PM |
@island
If your script accomplishes EXACTLY what mine does, then you win. Lol
The purpose is to shorten my ridiculously long simple script.
It is a simple script, but I overcomplicated it by making it long. |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 06:50 PM |
i get bonus points, mine was a one liner.
#nerdsunited |
|
|
| Report Abuse |
|
|
GOLDC3PO
|
  |
| Joined: 31 May 2011 |
| Total Posts: 509 |
|
|
| 29 Mar 2014 06:52 PM |
repeat until #Values > 5 table.insert(math.random(1,9),Values) end |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 06:53 PM |
@gold, attempted to call a nil value (Values)
#nerdsunited |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 06:57 PM |
@island
*kinda restarts*
How bout a .Chatted function?I'm sure we ALL like those..
Ill make a REALLY long one,and whoever makes shortest..
Well,yknow
D="hello world!" game.Players.ChildAdded:connect(function(p) p.Chatted:connect(function(M) M=M:lower() if M==D then Msg=Instance.new("Message",Workspace) Msg.Text=""..p.Name..": "..M..""--You also forgot a space THIS COMNENT DON'T COUNT end end) end) |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 07:00 PM |
Beat this:
game.Players.PlayerAdded:connect(function(p) p.Chatted:connect(function(m) if m:lower() == "hello world!" then Instance.new("Message",Workspace).Text = (p.Name..":"..m) end) end) |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 07:01 PM |
Btw@your comment
Spaces don't matter,but the parenthisis does the "("s
If they aren't there..
print "hi".."hello".."by"
Error,cuz no "("s |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 07:01 PM |
@island, you're missing an end
#nerdsunited |
|
|
| Report Abuse |
|
|
jode6543
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 5363 |
|
|
| 29 Mar 2014 07:01 PM |
There's a good chance your original script will error. If the second parameter to math.random happens to smaller than the first (which it could be, since your passing the return of another math.random into it), then the script will error.
~Jode |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 07:03 PM |
If that is what you want.
game.Players.ChildAdded:connect(function(p) p.Chatted:connect(function(m) if m:lower()=="hello world!" then Instance.new("Message",Workspace).Text=p.Name..": "..m end end) end)
You forgot an end by the way |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 07:04 PM |
@ver Thx for pointin that out
But,my script (even with the end) is still shortest
I win,on my own post :p |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 07:05 PM |
@war By changing that to .ChildAdded
It might error if something else inserts into game.Players but..
You win(I think) by like 2 characters |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 07:11 PM |
Me(factoring in the missed end): 181 characters war: 177 characters
He won,but mine won't ever error |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|