Reply To: Error with macro and array parameters

Home Forums Problems and solutions in GDL Object design Error with macro and array parameters Reply To: Error with macro and array parameters

#2807
Dominika Bobály
Keymaster

James, could you upload a small example package of the problem?
I tried to reproduce it:
– created object with 2 dynamic array variables
– created macro1 with 2 array parameters
– created macro2 with same array parameters
Inicialized array variables in the placeable object, called the macro the same way you did, the macro calls the second macro straight away, same script.
As long as there was a completely uninicialized array variable, I got the same warning you mentioned (the line number refers to the caller object script, not the macro, so the warning is a bit off in this respect, you are right).
But the moment all arrays got at least 1 element value, the warning disappeared.
Not sure if I got your workflow correctly.
Uploaded my version, to make sure. Please, check.

Dominika Bobály
Product Manager
GRAPHISOFT SE