Thread Tools Display Modes
05-24-10, 11:34 PM   #1
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Help Needed....

I need help! Only if you want though :P Otherwise, I'm sure I'll figure it out. I just got this little minimap working, and now it doesn't show anything all of a sudden, there was no change in code or anything like that, That I could remember, but for some reason the minimap ain't showing no more, and all I see is the tracking icon in the upper right corner of my screen. It was working great! It really was! I Got it working, slash command to move, everything! I was so happy! But, now, it ain't plainly showing, and I am not receiving any errors, and I also can still use the slash command, and I'm still getting feedback in the chat frame. Any help is appreciated and for some reason, I can't figure it out >.>

here is a pastie of it, and again, thank you for looking and i'm hoping I can figure it out :P

http://pastie.org/975763
  Reply With Quote
05-25-10, 03:31 AM   #2
Ailae
A Rage Talon Dragon Guard
 
Ailae's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 318
Only had a quick glance but this is your line 55 and 56:

Code:
Minimap:ClearAllPoints()
Minimap.SetPoint = function() end
..and then at 130-134 you do:

Code:
Minimap:SetScale(scale)
Minimap:SetFrameStrata("MEDIUM")
Minimap:ClearAllPoints()
Minimap:SetPoint(pos, UIParent, x, y)
You first nil :SetPoint() and then try to use it later.

Maybe that's it?
__________________
Oh, the simulated horror!
  Reply With Quote
05-25-10, 02:01 PM   #3
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
I never notice the little things! Thank you, I will see if that works.

edit - And it works! I will use this bit of help for reference next time I'm stuck Thank you again Screenie below, to show it off :P I plan to add some really cool skins made from scratch through ps :3
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_052510_130427.jpg
Views:	706
Size:	1.03 MB
ID:	4314  Click image for larger version

Name:	GEDC0950.JPG
Views:	670
Size:	107.3 KB
ID:	4315  Click image for larger version

Name:	GEDC0953.JPG
Views:	654
Size:	108.0 KB
ID:	4316  

Last edited by Ferous : 05-25-10 at 02:08 PM.
  Reply With Quote
05-25-10, 07:21 PM   #4
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
i don't want to make a new thread, so I will post here since I just made this yesterday. I have my setscale slash command working fine, however its sort of long and was wondering if there was a math shortcut I could use? lol Thanks for any replies and your consideration :P

Code: http://pastie.org/977299

I know, its scary :P But it works! Lol, I was just curious if there is a 'math' way of doing it easier? Thanks again.
  Reply With Quote
05-25-10, 07:30 PM   #5
mankeluvsit
An Onyxian Warder
 
mankeluvsit's Avatar
Join Date: Sep 2008
Posts: 354
Originally Posted by Ferous View Post
i don't want to make a new thread, so I will post here since I just made this yesterday. I have my setscale slash command working fine, however its sort of long and was wondering if there was a math shortcut I could use? lol Thanks for any replies and your consideration :P

Code: http://pastie.org/977299

I know, its scary :P But it works! Lol, I was just curious if there is a 'math' way of doing it easier? Thanks again.
two
Code:
local Scales = {
    ["768"] = 1,
    ["800"] = 0.96,
    ["864"] = 0.88888888888888,
    ["900"] = 0.85333333333333,
    ["960"] = 0.8,
    ["1024"] = 0.75,
    ["1050"] = 0.73142857142857,
    ["1080"] = 0.71111111111111,
    ["1200"] = 0.64,
}
function cSettings:PLAYER_LOGIN()
    if(not cSettingsDB.UIScale) then return end
    local _, height = string.match((({GetScreenResolutions()})[GetCurrentResolution()] or ""), "(%d+).-(%d+)")
    if(height and Scales[height]) then
        SetCVar("useUiScale", 1)
        SetCVar("uiScale", Scales[height])
    else
        SetCVar("useUiScale", 0)
        if(tonumber(height)>768) then
            print("Your resolution is not yet supported, disabling UI Scale.")
        end
    end
end
or
Code:
local autoscaling = true
local ufscale = 1

if autoscaling == true then
if GetCVar("UseUIScale") == "1" then
ufscale = (768/string.match(({GetScreenResolutions()})[GetCurrentResolution()], "%d+x(%d+)"))/GetCVar("UIScale")
end 
end
these are what i do.



or read on this http://www.wowinterface.com/forums/s...ad.php?t=31813
  Reply With Quote
05-25-10, 09:03 PM   #6
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
I'm not trying to do UI scale though I'm just trying to make it easier to scale the minimap, not UI :P
  Reply With Quote
05-25-10, 09:10 PM   #7
mankeluvsit
An Onyxian Warder
 
mankeluvsit's Avatar
Join Date: Sep 2008
Posts: 354
Originally Posted by Ferous View Post
I'm not trying to do UI scale though I'm just trying to make it easier to scale the minimap, not UI :P
if your like me you want things to be clean when coding.
im sure there is a simpler or less code, but is this what you wanted?
Code:
local scale = 1
SetScale(scale)
  Reply With Quote
05-25-10, 09:14 PM   #8
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Code:
Minimap:SetScale(tonumber(cmd))
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
05-25-10, 09:17 PM   #9
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Originally Posted by Seerah View Post
Code:
Minimap:SetScale(tonumber(cmd))
lawl awesome I KNEW it was tonumber but when I tried it, I must have wrote it wrong, and ... yeah Thank you seerah.

Also, I hate you Emberstorm!
  Reply With Quote
05-25-10, 09:18 PM   #10
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Originally Posted by mankeluvsit View Post
if your like me you want things to be clean when coding.
im sure there is a simpler or less code, but is this what you wanted?
Code:
local scale = 1
SetScale(scale)
I wanted what seerah said, I knew it was something like that :P But thank you for your help, it is appreciated.
  Reply With Quote
05-25-10, 09:18 PM   #11
mankeluvsit
An Onyxian Warder
 
mankeluvsit's Avatar
Join Date: Sep 2008
Posts: 354
Originally Posted by Ferous View Post
lawl awesome I KNEW it was tonumber but when I tried it, I must have wrote it wrong, and ... yeah Thank you seerah.

Also, I hate you Emberstorm!
i guess i overthought it ::P
  Reply With Quote
05-25-10, 09:28 PM   #12
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
awesome lol that huge code went down to:

Code:
SLASH_MYSCRIPT1 = "/scale";
SLASH_MYSCRIPT2 = "/mmscale";
SlashCmdList["MYSCRIPT"] = function(cmd)
	Minimap:SetScale(tonumber(cmd))
end
  Reply With Quote
05-25-10, 09:45 PM   #13
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
That's why I get paid the big bucks. hehe
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Help Needed....


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