Simple array in function question
BlitzMax Forums/BlitzMax Programming/Simple array in function question
| ||
I'm trying to do this: Global myarray[100,100] Function do_something(array[]) For Local i = 0 To 99 For Local n = 0 To 99 array[n,i] = 0 Next Next EndFunction do_something(myarray) What am I doing wrong? :) Error is: Unable to convert from Int Array to Int Array. |
| ||
You're passing a two dimensional array to a function which is expecting a one dimensional array. Put a comma between the two square brackets in your function declaration and it will be fine. |
| ||
Ahhh! thank you gabriel! |