gControl_OnClick error

Started by ironhide1975, Sat 21/06/2025 13:17:18

Previous topic - Next topic

ironhide1975

Upgraded to the latest version and got an error saying gControl_OnClick was missing from the gPanel?

Crimson Wizard

#1
Quote from: ironhide1975 on Sat 21/06/2025 13:17:18Upgraded to the latest version and got an error saying gControl_OnClick was missing from the gPanel?

Please post exact message that you get (you may right click on it and select "Copy" then paste here), and tell under which circumstances this happens.

I may guess you are referring to a warning (yellow icon) that is printed when compiling the game if some of the functions mentioned in the control's events is not present in script, or on contrary a function is present in script is not linked to the control's event.

You can double click on the message and that will bring you to the location in script or the GUI that has this mistake.

Crimson Wizard

Do you mean this message?

QuoteGUI (3) gPanel's event OnClick function "gControl_OnClick" not found in script GlobalScript.asc.

There was a mistake in older versions of Sierra template, where gPanel had a unused OnClick function. Simply remove it from events and the warning will be gone.

SMF spam blocked by CleanTalk