Gui OnEvent Error: Invalid callback function.
Gui OnEvent Error: Invalid callback function.
Instead of saying Error: Invalid callback function, tell the user that the number of parameters in the callback is insufficient, and that they must allocate at least one for the GUI object.
- WarlordAkamu67
- Posts: 231
- Joined: 21 Mar 2023, 06:52
Re: Gui OnEvent Error: Invalid callback function.
Impatient much? Why for this request? Surely you now know what to do when you get that message.
Indicating the parameter count is incorrect is one thing, but I am not going to include a verbose error message that includes conjecture about what the user's misconception is. What if the Gui isn't the missing parameter?
Indicating the parameter count is incorrect is one thing, but I am not going to include a verbose error message that includes conjecture about what the user's misconception is. What if the Gui isn't the missing parameter?
Re: Gui OnEvent Error: Invalid callback function.
Because it seems that there is something wrong with the function body or return value. Incorrect number of parameters, or requires at least one parameter?Either way "parameter" should be in the message
Re: Gui OnEvent Error: Invalid callback function.
@iseahound
I think you are answering a question which I did not ask. I already agreed that indicating the parameter count in the error message would be reasonable.
The callback function is invalid. There could be a number of causes, all of which should be found by comparing your callback function to the documentation.
I think you are answering a question which I did not ask. I already agreed that indicating the parameter count in the error message would be reasonable.
I don't know what you mean. How could there be something wrong with the function body or return value? If there was a syntax error in the function body, it would be reported at load time. The return value can't be known until the function is called, which obviously isn't happening when OnEvent is called.Because it seems that there is something wrong with the function body or return value.
The callback function is invalid. There could be a number of causes, all of which should be found by comparing your callback function to the documentation.
- WarlordAkamu67
- Posts: 231
- Joined: 21 Mar 2023, 06:52
Re: Gui OnEvent Error: Invalid callback function.
apologies. I only ment to say, I second this request ^.^ I have encountered and fixed this issue, yes. I understand not bloating with specific errors for everything, and careful reading of the documentation can (and will) point you in the direction of solving it. There are also several forum topics about having this problem.lexikos wrote: ↑15 Sep 2023, 18:08Impatient much? Why for this request? Surely you now know what to do when you get that message.
Indicating the parameter count is incorrect is one thing, but I am not going to include a verbose error message that includes conjecture about what the user's misconception is. What if the Gui isn't the missing parameter?