Thread Tools Display Modes
02-20-10, 05:29 PM   #1
fourtwenty
A Murloc Raider
Join Date: Jun 2008
Posts: 6
in need of some help >,.<

dont know if this is the place to ask, but as I suck with the search function Ill ask, if I were to make an addon loading /console SET mouseSpeed "0.2"
everytime I log in and such, instead of having to make a macro and then hitting it, how would one go about?
  Reply With Quote
02-20-10, 08:20 PM   #2
Akryn
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 479
Originally Posted by fourtwenty View Post
dont know if this is the place to ask, but as I suck with the search function Ill ask, if I were to make an addon loading /console SET mouseSpeed "0.2"
everytime I log in and such, instead of having to make a macro and then hitting it, how would one go about?
You can just add that to config.wtf

But if you wanted to do it as an addon:

lua Code:
  1. local f = CreateFrame("frame")
  2. f:RegisterEvent("VARIABLES_LOADED")
  3. f:SetScript("OnEvent", function()
  4.     SetCVar("mouseSpeed", 0.2)
  5. end
  Reply With Quote
02-21-10, 03:18 AM   #3
fourtwenty
A Murloc Raider
Join Date: Jun 2008
Posts: 6
thanks, well I tried adding it in the config but it decided to remove it if it was below 0.5 and didnt want to have it protected all the time.

---

1x mouseSpeed-1.0\mouseSpeed.lua:5: ')' expected (to close '(' at line 3) near '<eof>'

Last edited by fourtwenty : 02-21-10 at 03:49 AM.
  Reply With Quote
02-21-10, 04:49 AM   #4
karmamuscle
A Cobalt Mageweaver
 
karmamuscle's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 205
Missing a ) at the end of line 3.

lua Code:
  1. local f = CreateFrame("frame")
  2. f:RegisterEvent("VARIABLES_LOADED")
  3. f:SetScript("OnEvent", function())
  4.     SetCVar("mouseSpeed", 0.2)
  5. end
  Reply With Quote
02-21-10, 05:20 AM   #5
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
Originally Posted by ckramme View Post
Missing a ) at the end of line 3.

lua Code:
  1. local f = CreateFrame("frame")
  2. f:RegisterEvent("VARIABLES_LOADED")
  3. f:SetScript("OnEvent", function())
  4.     SetCVar("mouseSpeed", 0.2)
  5. end
Wrong. Missing a ) at the end of line 5:

lua Code:
  1. local f = CreateFrame("frame")
  2. f:RegisterEvent("VARIABLES_LOADED")
  3. f:SetScript("OnEvent", function()
  4.     SetCVar("mouseSpeed", 0.2)
  5. end)
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.
  Reply With Quote
02-21-10, 05:26 AM   #6
karmamuscle
A Cobalt Mageweaver
 
karmamuscle's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 205
ops sorry
  Reply With Quote
02-21-10, 05:50 AM   #7
fourtwenty
A Murloc Raider
Join Date: Jun 2008
Posts: 6
cheers guys :)
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » in need of some help >,.<


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