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
 

Stack End

Previous Thread :: Next Thread 
Catpwnszer is not online. Catpwnszer
Joined: 26 Nov 2010
Total Posts: 631
20 Jul 2011 04:28 PM
I ish made a script that's too long to post here but in the output it says stack end. What is it and how can I fix it? Nothing runs it just says stack end.
Report Abuse
1et is not online. 1et
Joined: 18 Jul 2011
Total Posts: 96
20 Jul 2011 04:39 PM
It needs an end
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
20 Jul 2011 04:40 PM
^_^
Don't give people advice in matters you don't know yourself.
Report Abuse
Catpwnszer is not online. Catpwnszer
Joined: 26 Nov 2010
Total Posts: 631
20 Jul 2011 04:47 PM
Exactly. I have a end. :P
Report Abuse
Merlin11188 is not online. Merlin11188
Joined: 20 Dec 2007
Total Posts: 4158
20 Jul 2011 04:52 PM
Stack end isn't an error...
Report Abuse
Catpwnszer is not online. Catpwnszer
Joined: 26 Nov 2010
Total Posts: 631
20 Jul 2011 04:55 PM
What is it? Then why won't my script run Mr?
Report Abuse
Merlin11188 is not online. Merlin11188
Joined: 20 Dec 2007
Total Posts: 4158
20 Jul 2011 04:57 PM
I don't know. But stack end means the stack trace-back is complete, and it happens when there is an error, but it isn't the error itself. It's supposed to reveal information about the error.
Report Abuse
Catpwnszer is not online. Catpwnszer
Joined: 26 Nov 2010
Total Posts: 631
20 Jul 2011 04:59 PM
It doesn't I ish will post my script
Report Abuse
Catpwnszer is not online. Catpwnszer
Joined: 26 Nov 2010
Total Posts: 631
20 Jul 2011 05:00 PM
Here ish meh script:


local d1 = game.Workspace.LockGate1.Door1
local d2 = game.Workspace.LockGate1.Door2
local d3 = game.Workspace.LockGate1.Door3
local d4 = game.Workspace.LockGate1.Door4
local d5 = game.Workspace.LockGate1.Door5
local d6 = game.Workspace.LockGate1.Door6
local d7 = game.Workspace.LockGate1.Door7
local d8 = game.Workspace.LockGate1.Door8
local b1 = game.Workspace.LockGate2.Door1
local b2 = game.Workspace.LockGate2.Door2
local b3 = game.Workspace.LockGate2.Door3
local b4 = game.Workspace.LockGate2.Door4
local b5 = game.Workspace.LockGate2.Door5
local b6 = game.Workspace.LockGate2.Door6
local b7 = game.Workspace.LockGate2.Door7
local b8 = game.Workspace.LockGate2.Door8
local m = game.Workspace.music
local mw = game.Workspace.Message

function onClicked ()
mw.Text = ("Stay behind the yellow line. Violators will be killed.")
wait(4)
mw.Text = ("The gate is opening.")
wait(2)
mw.Text = ("")
m:Play()
game.Workspace.Killer1.Script.Disabled = false
game.Workspace.Killer2.Script.Disabled = false
--------------------
d1.Transparency = 0 --
d1.CanCollide = true --
--------------------
d2.Transparency = 0 --
d2.CanCollide = true --
--------------------
d3.Transparency = 1
d3.CanCollide = false
--------------------
d4.Transparency = 1
d4.CanCollide = false
--------------------
d5.Transparency = 1
d5.CanCollide = false
--------------------
d6.Transparency = 1
d6.CanCollide = false
--------------------
d7.Transparency = 1
d7.CanCollide = false
--------------------
d8.Transparency = 1
d8.CanCollide = false
--------------------
wait(0.9)
--------------------
d1.Transparency = 1
d1.CanCollide = false
--------------------
d2.Transparency = 1
d2.CanCollide = false
--------------------
d3.Transparency = 0
d3.CanCollide = true
--------------------
d4.Transparency = 0
d4.CanCollide = true
--------------------
d5.Transparency = 1
d5.CanCollide = false
--------------------
d6.Transparency = 1
d6.CanCollide = false
--------------------
d7.Transparency = 1
d7.CanCollide = false
--------------------
d8.Transparency = 1
d8.CanCollide = false
--------------------
wait(0.9)
--------------------
d1.Transparency = 1
d1.CanCollide = false
--------------------
d2.Transparency = 1
d2.CanCollide = false
--------------------
d3.Transparency = 1
d3.CanCollide = false
--------------------
d4.Transparency = 1
d4.CanCollide = false
--------------------
d5.Transparency = 0
d5.CanCollide = true
--------------------
d6.Transparency = 0
d6.CanCollide = true
--------------------
d7.Transparency = 1
d7.CanCollide = false
--------------------
d8.Transparency = 1
d8.CanCollide = false
--------------------
wait(0.9)
--------------------
d1.Transparency = 1
d1.CanCollide = false
--------------------
d2.Transparency = 1
d2.CanCollide = false
--------------------
d3.Transparency = 1
d3.CanCollide = false
--------------------
d4.Transparency = 1
d4.CanCollide = false
--------------------
d5.Transparency = 1
d5.CanCollide = false
--------------------
d6.Transparency = 1
d6.CanCollide = false
--------------------
d7.Transparency = 0
d7.CanCollide = true
--------------------
d8.Transparency = 0
d8.CanCollide = true
--------------------
print("Gate Opened")
m:Stop()
mw.Text = ("The gate has opened.")
wait(4)
mw.Text = ("The gate is closing.")
wait(2)
print("Gate Closing")
m:Play()
--------------------
d1.Transparency = 1
d1.CanCollide = false
--------------------
d2.Transparency = 1
d2.CanCollide = false
--------------------
d3.Transparency = 1
d3.CanCollide = false
--------------------
d4.Transparency = 1
d4.CanCollide = false
--------------------
d5.Transparency = 1
d5.CanCollide = false
--------------------
d6.Transparency = 1
d6.CanCollide = false
--------------------
d7.Transparency = 0
d7.CanCollide = true
--------------------
d8.Transparency = 0
d8.CanCollide = true
--------------------
wait(0.9)
--------------------
d1.Transparency = 1
d1.CanCollide = false
--------------------
d2.Transparency = 1
d2.CanCollide = false
--------------------
d3.Transparency = 1
d3.CanCollide = false
--------------------
d4.Transparency = 1
d4.CanCollide = false
--------------------
d5.Transparency = 0
d5.CanCollide = true
--------------------
d6.Transparency = 0
d6.CanCollide = true
--------------------
d7.Transparency = 1
d7.CanCollide = false
--------------------
d8.Transparency = 1
d8.CanCollide = false
--------------------
wait(0.9)
--------------------
d1.Transparency = 1
d1.CanCollide = false
--------------------
d2.Transparency = 1
d2.CanCollide = false
--------------------
d3.Transparency = 0
d3.CanCollide = true
--------------------
d4.Transparency = 0
d4.CanCollide = true
--------------------
d5.Transparency = 1
d5.CanCollide = false
--------------------
d6.Transparency = 1
d6.CanCollide = false
--------------------
d7.Transparency = 1
d7.CanCollide = false
--------------------
d8.Transparency = 1
d8.CanCollide = false
--------------------
wait(0.9)
--------------------
d1.Transparency = 0
d1.CanCollide = true
--------------------
d2.Transparency = 0
d2.CanCollide = true
--------------------
d3.Transparency = 1
d3.CanCollide = false
--------------------
d4.Transparency = 1
d4.CanCollide = false
--------------------
d5.Transparency = 1
d5.CanCollide = false
--------------------
d6.Transparency = 1
d6.CanCollide = false
--------------------
d7.Transparency = 1
d7.CanCollide = false
--------------------
d8.Transparency = 1
d8.CanCollide = false
--------------------
m:Stop()
mw.Text = ("The gate has closed")
wait(2)
print ("Gate Closed")
wait(1)
print ("Water Going Down")
mw.Text = ("The water level is dropping.")
wait(2.5)
m:Play()
game.Workspace.WaterLevels.Platform.BodyVelocity.velocity = Vector3.new(0, -2, 0)
wait(10)
game.Workspace.WaterLevels.Platform.BodyVelocity.velocity = Vector3.new(0, 0, 0)
m:Stop()
print ("Water Down")
mw.Text = ("Water released.")
wait(1)
print ("Gate Opening")
mw.Text = ("The gate is Opening.")
wait(2)
mw.Text = ("")
m:Play()
--------------------
b1.Transparency = 0
b1.CanCollide = true
--------------------
b2.Transparency = 0
d2.CanCollide = true
--------------------
b3.Transparency = 1
b3.CanCollide = false
--------------------
b4.Transparency = 1
b4.CanCollide = false
--------------------
b5.Transparency = 1
b5.CanCollide = false
--------------------
b6.Transparency = 1
b6.CanCollide = false
--------------------
b7.Transparency = 1
b7.CanCollide = false
--------------------
b8.Transparency = 1
b8.CanCollide = false
--------------------
wait(0.9)
--------------------
b1.Transparency = 1
b1.CanCollide = false
--------------------
b2.Transparency = 1
b2.CanCollide = false
--------------------
b3.Transparency = 0
b3.CanCollide = true
-------------------
b4.Transparency = 0
b4.CanCollide = true
--------------------
b5.Transparency = 1
b5.CanCollide = false
--------------------
b6.Transparency = 1
b6.CanCollide = false
--------------------
b7.Transparency = 1
b7.CanCollide = false
--------------------
b8.Transparency = 1
b8.CanCollide = false
--------------------
wait(0.9)
--------------------
b1.Transparency = 1
b1.CanCollide = false
--------------------
b2.Transparency = 1
b2.CanCollide = false
--------------------
b3.Transparency = 1
b3.CanCollide = false
--------------------
b4.Transparency = 1
b4.CanCollide = false
--------------------
b5.Transparency = 0
b5.CanCollide = true
--------------------
b6.Transparency = 0
b6.CanCollide = true
--------------------
b7.Transparency = 1
b7.CanCollide = false
--------------------
b8.Transparency = 1
b8.CanCollide = false
--------------------
wait(0.9)
--------------------
b1.Transparency = 1
b1.CanCollide = false
--------------------
b2.Transparency = 1
b2.CanCollide = false
--------------------
b3.Transparency = 1
b3.CanCollide = false
--------------------
b4.Transparency = 1
b4.CanCollide = false
--------------------
b5.Transparency = 1
b5.CanCollide = false
--------------------
b6.Transparency = 1
b6.CanCollide = false
--------------------
b7.Transparency = 0
b7.CanCollide = true
--------------------
b8.Transparency = 0
b8.CanCollide = true
--------------------
m:Stop()
mw.Text = ("The gate has opened.")
wait(2)
mw.Text = ("")
print("Gate Opened")
wait(1)
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
20 Jul 2011 05:03 PM
._.

Use tables, make your code a lot more readable.

And that doesn't help me, seeing as I'm too lazy to read it, and other people are likely feeling similar. Just post the output.
Report Abuse
Catpwnszer is not online. Catpwnszer
Joined: 26 Nov 2010
Total Posts: 631
20 Jul 2011 05:04 PM
Only if I could make a table. -.- The output is: Stack end. That's it.
Report Abuse
Merlin11188 is not online. Merlin11188
Joined: 20 Dec 2007
Total Posts: 4158
20 Jul 2011 05:22 PM
This is all the help I'm going to give. Retyping is boring.
local d = {}
local b = {}
for i = 1, 8 do
table.insert(d, game.Workspace.LockGate1["Door"..tostring(i)])
end
for i = 1, 8 do
table.insert(b, game.Workspace.LockGate2["Door"..tostring(i)])
end
local m = game.Workspace.music
local mw = game.Workspace.Message

function onClicked ()
mw.Text = ("Stay behind the yellow line. Violators will be killed.")
wait(4)
mw.Text = ("The gate is opening.")
wait(2)
mw.Text = ("")
m:Play()
game.Workspace.Killer1.Script.Disabled = false
game.Workspace.Killer2.Script.Disabled = false
d[1].Transparency = 0
d[1].CanCollide = true
d[2].Transparency = 0
d[2].CanCollide = true
for i = 3, 8 do
d[i].Transparency = false
d[i].CanCollide = true
end
wait(.9)
d[1].Transparency = 1
d[1].CanCollide = false
d[2].Transparency = 1
d[2].CanCollide = false
for i = 3, 8 do
d[i].Transparency = 0
d[i].CanCollide = true
end
wait(0.9)
for i = 1, 4 do
d[i].Transparency = 1
d[i].CanCollide = false
end
for i = 5, 8 do
d[i].Transparency = 0
d[i].CanCollide = true
end
wait(0.9)
for i = 1, 6 do
d[i].Transparency = 1
d[i].CanCollide = false
end
for i = 7, 8 do
d[i].Transparency = 0
d[i].CanCollide = true
end
print("Gate Opened")
m:Stop()
mw.Text = ("The gate has opened.")
wait(4)
mw.Text = ("The gate is closing.")
wait(2)
print("Gate Closing")
m:Play()
for i = 1, 6 do
d[i].Transparency = 1
d[i].CanCollide = false
end
for i = 7, 8 do
d[i].Transparency = 0
d[i].CanCollide = false
end
wait(0.9)
for i = 1, 4 do
d[i].Transparency = 1
d[i].CanCollide = false
end
for i = 5, 6 do
d[i].Transparency = 0
d[i].CanCollide = true
end
for i = 7, 8 do
d[i].Transparency = 1
d[i].CanCollide = false
end
wait(0.9)
for i = 1, 2 do
d[i].Transparency = 1
d[i].CanCollide = false
end
for i = 3, 4 do
d[i].Transparency = 0
d[i].CanCollide = true
end
for i = 5, 8 do
d[i].Transparency = 1
d[i].CanCollide = false
end
wait(0.9)
for i = 1, 2 do
d[i].Transparency = 0
d[i].CanCollide = true
end
for i= 3, 8 do
d[i].Transparency = 1
d[i].CanCollide = false
end
m:Stop()
mw.Text = ("The gate has closed")
wait(2)
print ("Gate Closed")
wait(1)
print ("Water Going Down")
mw.Text = ("The water level is dropping.")
wait(2.5)
m:Play()
game.Workspace.WaterLevels.Platform.BodyVelocity.velocity = Vector3.new(0, -2, 0)
wait(10)
game.Workspace.WaterLevels.Platform.BodyVelocity.velocity = Vector3.new(0, 0, 0)
m:Stop()
print ("Water Down")
mw.Text = ("Water released.")
wait(1)
print ("Gate Opening")
mw.Text = ("The gate is Opening.")
wait(2)
mw.Text = ("")
m:Play()
for i = 1, 2 do
b[i].Transparency = 0
b[i].CanCollide = true
end
for i = 3, 8 do
b[i].Transparency = 1
b[i].CanCollide = false
end
wait(0.9)
for i = 1, 2 do
b[i].Transparency = 1
b[i].CanCollide = false
end
for i = 3, 4 do
b[i].Transparency = 0
b[i].CanCollide = true
end
wait(0.9)
for i = 3, 6 do
b[i].Transparency = not b[i].Transparency
b[i].CanCollide = not b[i].CanCollide
end
wait(0.9)
for i = 7, 8 do
b[i].Transparency = 0
b[i].CanCollide = true
end
m:Stop()
mw.Text = ("The gate has opened.")
wait(2)
mw.Text = ("")
print("Gate Opened")
wait(1)
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
Ozzypig is not online. Ozzypig
Joined: 27 Mar 2008
Total Posts: 4906
20 Jul 2011 05:28 PM
Hey, there's these new inventions called "tables" and "for statements".

Learn them?

http://www.lua.org/pil/2.5.html
http://www.lua.org/pil/4.3.5.html

~Ozzy
Report Abuse
unknown89089 is not online. unknown89089
Joined: 21 Aug 2008
Total Posts: 2961
20 Jul 2011 05:29 PM
Well, he did use for statements.
Report Abuse
Catpwnszer is not online. Catpwnszer
Joined: 26 Nov 2010
Total Posts: 631
20 Jul 2011 05:40 PM
Ok. I will check it out Ozzy.
Report Abuse
Catpwnszer is not online. Catpwnszer
Joined: 26 Nov 2010
Total Posts: 631
20 Jul 2011 05:46 PM
I just have a HARD time learning tables. Their so useful though! :O
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