Jump to content
pierremgi

Determine if an entry parameter is array or a string

Recommended Posts

Hi,

I can't remember where I read something about that. I didn't find after several hours of seach on BIKI and forums, how to manage an entry parameter which could have several format like string or array.

For example:

params [ ["_firstParam", "trial", ["",["","","",""]] ], ...., ["_otherParam", 0, [0]], ["_lastParam", true, [true]] ];

 

Not sure to write this first param at its best...

 I'd like to let the player enter  so various things as "", "test", [test,""] ... (always with string(s) , not mandatory for single one,  then work with the entry, like this principle:

if string then

  if empty then something...  else other code

if array then

  if empty then something...  else other code

 

The code is not my problem here, just the way to make difference between a string and an array without returning an error.

 

Thanks

Share this post


Link to post
Share on other sites

More than 3 hours to miss that! Thanks a lot!

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×