Jump to content
Sign in to follow this  
Homer Johnston

select cmd within a do loop

Recommended Posts

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">test = [1,2,3,4,5,6];

for "_i" from 0 to 3 do

{

test select 1 = [10];

};

Can anyone tell me why this generates a "Type: String, expected: Code" error? It seems to go away if I get rid of the select command (ie test = [10]; )

Thanks!

Share this post


Link to post
Share on other sites

That means something didn't work properly within your loop.

It could be one of two things:

1) looks like you're trying to set the value of the first element to 10. However, you need to use the set command to set an array element.

http://community.bistudio.com/wiki/set

2) You might need to put parentheses around "test select 1". Depending on the order of evaluation, you might end up performing a command on the number, not the thing the array returned. Best to put those in parens.

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  

×