Squiddle Posted July 12, 2009 Author Share Posted July 12, 2009 Hi everyone! I currently have some sort of problem with my paint tool, so I can't test this script out, but let me give you an example. What I want it for it to check if the variable Kitten equals 1, 3, or any other thing. Let me show you what I mean:```If Kitten = 0 Then Call Pig(Index)ElseIf Kitten = 3 Then Call Spider(Index)Else Call Monkey(Index)End If```Now, what I want is for that code to run Monkey(Index) as logn as Kitten doesn't equal 1 or 3! So this is what I want:If Kitten = 0 > Run Pig(Index)If Kitten = anything other than 0 or 3 > Run Spider(Index)If Kitten = 3 > Run Monkey(Index)Would this work? Sorry for uncreative sub names, by the way ;). Link to comment Share on other sites More sharing options...
emblem Posted July 12, 2009 Share Posted July 12, 2009 ```If Kitten = 1 Then Call Pig(Index)ElseIf Kitten = 3 Then Call Monkey(Index)Else Call Spider(Index)End If```Should Indeed work Link to comment Share on other sites More sharing options...
Squiddle Posted July 12, 2009 Author Share Posted July 12, 2009 Good =D. Link to comment Share on other sites More sharing options...
Admiral Refuge Posted July 12, 2009 Share Posted July 12, 2009 Ehh, you could just use a select case:```Select Case Kitten Case 0 Call Pig(Index) Case 3 Call Spider(Index) Case Else Call Monkey(Index)End Select```Then, you can also use more "Case"s, to compare it to other values. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now