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 » Scripters
Home Search
 

Re: Is there a limit?

Previous Thread :: Next Thread 
vacharya is not online. vacharya
Joined: 06 Jan 2011
Total Posts: 511
30 Jan 2015 08:06 AM
On how many
elseif part.Value == "Cats" then
can be used in a loop running through all the parts?
I have about 9 elseif's and it just doesnt reach the 8th one..
Nothing on the output, I've checked and double checked that the value Cats exists and even put a print("Reach") to no avail.


Any help would be appreciated :D
Report Abuse
iwishforpie1 is not online. iwishforpie1
Joined: 20 Mar 2011
Total Posts: 1423
30 Jan 2015 08:13 AM
If it's not working, try putting a print there and marks everywhere when you run to an event problem. Though, I do not think there is considering I used 12 elseifs once.
Report Abuse
vacharya is not online. vacharya
Joined: 06 Jan 2011
Total Posts: 511
30 Jan 2015 08:52 AM
I did, it just never reaches there..
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
30 Jan 2015 11:09 AM
Post code please.
Report Abuse
vacharya is not online. vacharya
Joined: 06 Jan 2011
Total Posts: 511
30 Jan 2015 02:00 PM
well the code is VERY long but here it what it does

v.MouseButton1Down:connect(function()
if v.Name == "Pig" then
print("Pig")
elseif v.Name == "Dog" then
print("Dog")
elseif v.Name == "John" then
print("John")
elseif v.Name == "Wolf" then
print("Wolf")
elseif v.Name == "Pi" then
print("pi")
elseif v.Name == "Name" then
print("Name")
elseif v.Name == "Join" then
print("Join")
elseif v.Name == "Cat" then --This is where it stops, nothing on the output..
--The hypothetical "Cat" does exist
--Could it be because of too many elseif's? IS there a limit on elseif's?
--NOTHING from this point on runs.. (No output errors)
print("Cat")

end
end)

:)
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
30 Jan 2015 02:02 PM
There is no limit on elseif.

Are you sure it's called Cat? That seems like the only possible problem here, a type or something.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
30 Jan 2015 02:04 PM
try

v.MouseButton1Down:connect(function()
print(v.Name)
if v.Name == "Pig" then
print("Pig")
elseif v.Name == "Dog" then
print("Dog")
elseif v.Name == "John" then
print("John")
elseif v.Name == "Wolf" then
print("Wolf")
elseif v.Name == "Pi" then
print("pi")
elseif v.Name == "Name" then
print("Name")
elseif v.Name == "Join" then
print("Join")
elseif v.Name == "Cat" then --This is where it stops, nothing on the output..
--The hypothetical "Cat" does exist
--Could it be because of too many elseif's? IS there a limit on elseif's?
--NOTHING from this point on runs.. (No output errors)
print("Cat")

end
end)


And see what prints.
Report Abuse
Roblok1 is not online. Roblok1
Joined: 27 Jul 2011
Total Posts: 2019
30 Jan 2015 02:07 PM
just use a recursive function.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
30 Jan 2015 02:22 PM
@roblo that has nothing to do with what he's trying to do.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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