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: input check

Previous Thread :: Next Thread 
BetaGrey361 is not online. BetaGrey361
Joined: 27 Jun 2014
Total Posts: 118
25 Aug 2014 07:17 AM


local name = script.Parent.Parent.Parent.Parent.Parent.Parent.Name.lower
local alphaName = tostring(name)
local bravoName = string.lower(alphaName)

function check()
local input = script.Parent.Parent.input.Text
local alphaInput = tostring(input)
local bravoInput = string.lower(alphaInput)
if bravoInput == bravoName then
enter()
else
error()
end
end

It fires Error, even when the Input is correct. Any ideas why?
Report Abuse
IcyFires is not online. IcyFires
Joined: 29 Jun 2013
Total Posts: 5046
25 Aug 2014 07:20 AM
"enter()" You have got to be kidding me. You didn't define the function enter.

http://www.roblox.com/--item?id=171600495
Report Abuse
BetaGrey361 is not online. BetaGrey361
Joined: 27 Jun 2014
Total Posts: 118
25 Aug 2014 07:27 AM
I have the function. I just chose not to put it in.

function enter()
local mask = script.Parent.Parent.Parent.fade
for i = 1,40 do
mask.Transparency = mask.Transparency - 0.025
wait()
end
end

function error()
local output = script.Parent.Parent.output
output.TextColor3 = Color3.new(255/255,0/255,0/255)
output.Text = ('Error, Try Again')
end
Report Abuse
IcyFires is not online. IcyFires
Joined: 29 Jun 2013
Total Posts: 5046
25 Aug 2014 07:34 AM
I don't see a problem, but there is a Roblox method already called error, so I don't know if you knew that.

http://www.roblox.com/--item?id=171600495
Report Abuse
BetaGrey361 is not online. BetaGrey361
Joined: 27 Jun 2014
Total Posts: 118
25 Aug 2014 07:38 AM
Well, it fires my error. But even when the input is how it should be, it doesn't fire Enter.
Report Abuse
IcyFires is not online. IcyFires
Joined: 29 Jun 2013
Total Posts: 5046
25 Aug 2014 07:40 AM
local name = script.Parent.Parent.Parent.Parent.Parent.Parent.Name.lower
local alphaName = tostring(name)
local bravoName = string.lower(alphaName)

function check()
local input = script.Parent.Parent.input.Text
local alphaInput = tostring(input)
local bravoInput = string.lower(alphaInput)
if bravoInput == bravoName then
enter()
elseif bravoInput ~= bravoName then
error()
end
end
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