Thread Tools Display Modes
01-02-22, 08:37 PM   #1
jlrm365
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 113
Question console command into addon

Hello. I hope the title was clear.

I'm attempting to put a console command into a basic addon, to fire when logging in, transitioning into an instance, etc.

I diligently report LUA errors, but I'd still like to play without them. To that end, I use
/console scriptErrors 0

I found this handy little wowpedia article: PLAYER_ENTERING_WORLD


I've since tried about a dozen ways to put the console command into the lua, but haven't been successful.
Could anyone do it and then possibly explain why it has to be that way (the way you did it)?

Thanks!
  Reply With Quote
01-02-22, 11:10 PM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
Code:
SetCVar("scriptErrors", 0)
/console is just macro for SetCVar.

But errors should really be fixed rather than ignored.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
01-02-22, 11:13 PM   #3
jlrm365
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 113
Originally Posted by Fizzlemizz View Post
Code:
SetCVar("scriptErrors", 0)
/console is just macro for SetCVar.

But errors should really be fixed rather than ignored.
I'm aware of handling errors, which is why they're reported.

I thought it might be, the console / setcvar connection, but I was still unsure of how to put it together. It's like knowing the words in another language, but not the combinations.

I'll try to remember that.

Thanks!


EDIT:


Could you put more than one SetCVar line into a space, one after the other?
Thanks.

Last edited by jlrm365 : 01-02-22 at 11:52 PM. Reason: extra question
  Reply With Quote
01-03-22, 05:35 AM   #4
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,359
Most proper error reporting addons have ways to make errors less intrusive (no popups etc)

So my suggestion would be to use BugGrabber & BugSack / Bugger, or any of the dedicated error catching addons, then look through their options to mute their output.
  Reply With Quote
01-03-22, 10:15 AM   #5
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
Originally Posted by jlrm365 View Post
EDIT:


Could you put more than one SetCVar line into a space, one after the other?
Thanks.
Yes........
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
01-03-22, 12:30 PM   #6
jlrm365
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 113
Originally Posted by Dridzt View Post
Most proper error reporting addons have ways to make errors less intrusive (no popups etc)

So my suggestion would be to use BugGrabber & BugSack / Bugger, or any of the dedicated error catching addons, then look through their options to mute their output.
I was aware and I do report, but thanks for those.
  Reply With Quote
01-03-22, 12:30 PM   #7
jlrm365
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 113
Originally Posted by Fizzlemizz View Post
Yes........
Thanks.
That's the thread answered.
Much appreciated.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » console command into addon

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off