Posted By: krial057
Initializing Panels with variables doesn't work - 06/02/13 12:53
Hello,
I think it is not possible to use variables in Panel struct initializations:
I get a "number syntax test" error for the line "PANEL* looptxt_pan = { pos_x = test;}"
However, the variable initialization works for Vector and custom structs(didn't try it with other engine objects yet)
The manual says:
But I couldn't find anything that it isn't working with Panels.
I think it is not possible to use variables in Panel struct initializations:
Code:
var test = 2; typedef struct Custom_Panel{ var test_x; } Custom_Panel; Custom_Panel* mypan = { test_x = test;} VECTOR* testVec = {x = test;} PANEL* looptxt_pan = { pos_x = test;}
I get a "number syntax test" error for the line "PANEL* looptxt_pan = { pos_x = test;}"
However, the variable initialization works for Vector and custom structs(didn't try it with other engine objects yet)
The manual says:
Quote:
Within the struct initialization, any numbers, variables, character strings, or pointers to other structs can be used, but internal engine variables (such as "camera"), and #defines (such as a previously defined "NUMBER_OF_ARRAY_ELEMENTS") can not be used.
But I couldn't find anything that it isn't working with Panels.