"as far as I know in blitz basic an array cube(10) has 11 elements : cube(0),cube(1).....cube(10)"
That is incorrect. The number you put in when dimming an array is the number of elements. Thus dim cube(10) will create an array with 10 elements, from cube(0) to cube(9)
Why you get the specific behavior you describe is a mystery to me. Try correcting your loop; maybe that won't fix your problem, but hey, it's worth a shot. By the way, you didn't answer my question. Are cubes actually being created? That is, do you see the cubes you created when rendering a camera view of the scene? If something goes wrong and prevents an entity from being created, you don't get any error until you attempt to use that entity in a command.
As for your other problem, you need to be more specific about your code. Explaining that you are using include files is a step in the right direction but not enough. For example, are the two lines you posted in different bb files?
I suspect the problem is due to sloppiness with the scope of the variable. Try declaring Global man at the top of your code, outside of any functions, and see if that helps.
That is incorrect. The number you put in when dimming an array is the number of elements. Thus dim cube(10) will create an array with 10 elements, from cube(0) to cube(9)
Why you get the specific behavior you describe is a mystery to me. Try correcting your loop; maybe that won't fix your problem, but hey, it's worth a shot. By the way, you didn't answer my question. Are cubes actually being created? That is, do you see the cubes you created when rendering a camera view of the scene? If something goes wrong and prevents an entity from being created, you don't get any error until you attempt to use that entity in a command.
As for your other problem, you need to be more specific about your code. Explaining that you are using include files is a step in the right direction but not enough. For example, are the two lines you posted in different bb files?
I suspect the problem is due to sloppiness with the scope of the variable. Try declaring Global man at the top of your code, outside of any functions, and see if that helps.