Jump to content
Sign in to follow this  
amoult

arrays

Recommended Posts

is there a maximum number of array elements? I tried to put all animation move strings (800~ or so) to one array put it gave an error.

Could someone take a look what's wrong

with it?

I tried to call that as an script (renamed .sqs and added ; to the end of line).

Share this post


Link to post
Share on other sites

Yes, there is a problem. There is an invalid entry:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"BasicDriverD"ead"

After that it worked ok, returning about 740 elements. But you have to use execVM to read the file. exec will return errors for some unexplained reason, even on the fixed version.

Share this post


Link to post
Share on other sites

"BasicDriverD"ead"

Extra quote.

Not sure if there's anything else wrong with it or not, but that's the obvious.

Syntax highlighting is your friend man. Do some looking around on that subject, it'll help you out.

As to array length limits, I'm not sure on that.

Posted at the same time....

Well, that's just double the confirmation for you.

Share this post


Link to post
Share on other sites

Thank you, both of you! I should have checked syntax highlighting right away banghead.gif

Bit strange though that exec gives errors still..

Now I'm gonna make myself a little action menu thingy to preview animations smile_o.gif

Share this post


Link to post
Share on other sites

Lines of code with more than 4096 characters could not be read by OFP, so your error is possibly being caused by something similar in ArmA. Break the line up like this:

myArray = [data,data,data,...,data]

myArray = myArray + [data,data,data,...,data]

and so on.

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
Sign in to follow this  

×