07.03.2016, 23:05
Let's first declare and initialize one-dimensional and two-dimensional arrays on a global scale
Nice, works well. Now let's do the same inside any function (for example inside of main() ) with a one-dimensional array.
So far so good. Now let's try it out with a two-dimensional array
Nope, not working. Getting this kind of error
What's the problem? How do I initialize two-dimensional arrays (using ellipsis!) inside of a function?
Код:
new a[10] = {1, ...}; new b[10][2] = {{1, 1}, ...};
Код:
main(){ new a[10] = {1, ...}; }
Код:
main(){ new b[10][2] = {{1, 1}, ...}; }
Код:
C:\blablabla\gamemodes\test.pwn(9) : error 029: invalid expression, assumed zero