Naive Question: assert() error message
This is my first foray into LUA and WoW Addon development. So apologies in advance for the naivity.
Note the call to assert() in the function below. While it terminates the program correctly, it doesn't print the error message to the chat frame. This is so simple that I'm convinced I'm missing something. Does assert(), for example, use a different output that the chat frame? Any help would be very much appreciated. Code:
function debugPlay() |
assert() does not print a chat message, it raises a Lua error. You won't see it if you have Lua errors disabled or whatever error catching addon you may be using is hiding it.
|
It prints to the error output.
If you have BugGrabber and BugSack intalled Code:
/run local function debugPlay() BugSack will display: Quote:
|
Kanegasi and Fizzlemizz - Thanks to you both. I thought it might be something like that.
|
Completely off-topic, but since you mentioned you're new at this, please have a look at how to scope your variables properly.
Generally speaking, global variables should only be used for things you want to access externally. |
All times are GMT -6. The time now is 09:16 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI