There is a Encyclopedia in the map I am maintaining. It has several category and each category has lots of entries which are dialog controls. When a player switches between pages, I use function 「DialogControlIsVisible」 to know if the entry ui of a position is under displaying, and decide the next step.
However, when a dialog control is not visible, it do return FALSE, but reports error 「DialogControlGetPropertyAsBool cannot get for parameter "property" as 12」. I wonder that:
<p>native bool DialogControlIsVisible (int control, int player);</p>
<p>native bool DialogControlGetPropertyAsBool (int control, int property, int player);</p>
<p>bool DialogControlIsVisible (int control, int player)<br />{<br /> return bool DialogControlGetPropertyAsBool (control, cINT_PROPETY_VISIBLITY,player);<br />}</p>
How could it works properly while reporting a error? Does the galaxy editor relies on a bug to run?
Plus, the error always and only occurs for the first 5 entries. That means when the number of entries of a category is not more than 5, every one of them reports this error. When the number of entries of a category is more than 5, only the first 5 entries report this error.
1. I output debug info and make sure the error is reported in the step of function 「DialogControlIsVisible」.
2. I check the bound of the array and make sure there is no outbound problem.
3. I out put debug info and make sure the dialog control is not NULL when use the function, and the parameter of player is OK.
4. The problem that unease me most is how can it only happens for the first 5 dialog control?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
There is a Encyclopedia in the map I am maintaining. It has several category and each category has lots of entries which are dialog controls. When a player switches between pages, I use function 「DialogControlIsVisible」 to know if the entry ui of a position is under displaying, and decide the next step.
However, when a dialog control is not visible, it do return FALSE, but reports error 「DialogControlGetPropertyAsBool cannot get for parameter "property" as 12」. I wonder that:
How could it works properly while reporting a error? Does the galaxy editor relies on a bug to run?
Plus, the error always and only occurs for the first 5 entries. That means when the number of entries of a category is not more than 5, every one of them reports this error. When the number of entries of a category is more than 5, only the first 5 entries report this error.
1. I output debug info and make sure the error is reported in the step of function 「DialogControlIsVisible」.
2. I check the bound of the array and make sure there is no outbound problem.
3. I out put debug info and make sure the dialog control is not NULL when use the function, and the parameter of player is OK.
4. The problem that unease me most is how can it only happens for the first 5 dialog control?