Jump to content
Sign in to follow this  
PerryRaptor

I need to trap an array error when element is missing

Recommended Posts

I use a single dimension array to capture user input in an edit box, I use StringSplit($ChatBox1, ' ', 1) triggering on a space ' ' to as the delimiter.

Sometimes there will not be an element 3, array[3] and I need some way of capturing this error allowing the script to move on.

IF array[3] <doesn't exist expression> then array[3] = "parameter is missing...try again"

I need help with coding the <doesn't exist expression>

Share this post


Link to post
Share on other sites

I use a single dimension array to capture user input in an edit box, I use StringSplit($ChatBox1, ' ', 1) triggering on a space ' ' to as the delimiter.

Sometimes there will not be an element 3, array[3] and I need some way of capturing this error allowing the script to move on.

IF array[3] <doesn't exist expression> then array[3] = "parameter is missing...try again"

I need help with coding the <doesn't exist expression>

Perhaps the @error macros may help. You can check to see if an error occurs and have it output what you want.

[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...