Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why does it display this error?

Hello everyone! :)

I am very happy that I just made a meltdown detector script. But I have a problem, it displays

Workspace.FanButton.FanButton1.Script:19: '' expected near 'end'

in the error console. Why?

The script works fine. Nothing is broken. It is when I added >= it displays this error. Before I had == 1000

Can someone please tell me what is causing this error? :p Thanks.

Temperature=game.Workspace.TemperatureValue
ReactorSafeguards=game.Workspace.ReactorSafeguards
ReactorMeltdownSong=game.Workspace.ReactorMeltdownSong
FanProtector1=game.Workspace.FanProtector.Image1
FanProtector2=game.Workspace.FanProtector.Image2
FanProtector3=game.Workspace.FanProtector.Image3
FanProtector4=game.Workspace.FanProtector.Image4
FanProtector5=game.Workspace.FanProtector.Image5
FanStatus1=game.Workspace.FanStatus.FanStatus1.Decal
FanStatus2=game.Workspace.FanStatus.FanStatus2.Decal
FanStatus3=game.Workspace.FanStatus.FanStatus3.Decal
FanStatus4=game.Workspace.FanStatus.FanStatus4.Decal
FanStatus5=game.Workspace.FanStatus.FanStatus5.Decal
FanProtector=game.Workspace.FanProtector

while true do
	wait()
if Temperature.Value >= 1000 then
    Temperature.Value = 1001	
    FanProtector.Transparency = 1
    FanProtector.CanCollide = true
	FanProtector1.Texture = ''
	FanProtector2.Texture = ''
	FanProtector3.Texture = ''
	FanProtector4.Texture = ''
	FanProtector5.Texture = ''
	FanStatus1.Texture = 'http://www.roblox.com/asset/?id=163640412'
	FanStatus2.Texture = 'http://www.roblox.com/asset/?id=163640412'
	FanStatus3.Texture = 'http://www.roblox.com/asset/?id=163640412'
	FanStatus4.Texture = 'http://www.roblox.com/asset/?id=163640412'
	FanStatus5.Texture = 'http://www.roblox.com/asset/?id=163640412'
	ReactorSafeguards:Play()
	wait(2)
	ReactorMeltdownSong:Play()
	wait(4)
	ReactorSafeguards:Play()
end
end

1 answer

I just ran this script and am not getting this syntax error (I hadn't seen anything wrong in the syntax)

Try restarting studio and trying again.


EDIT: Actually, maybe you pasted here the wrong script. The error sounds like there should be an end near to line 19, however there isn't. Also check that you actually looking at the right script (FanButton1's Script)


Style note: You should tab your code properly!


-- ...
FanStatus5=game.Workspace.FanStatus.FanStatus5.Decal
FanProtector=game.Workspace.FanProtector

while true do
	wait()
	if Temperature.Value >= 1000 then
		Temperature.Value = 1001    
		FanProtector.Transparency = 1
		FanProtector.CanCollide = true
		FanProtector1.Texture = ''
-- ...

1 comment

0

No, I pasted the right script. Anyway, it doesn't matter :) The script works fine.

This discussion is preserved as it was. New answers, comments, and votes are closed.