Thread Tools Display Modes
08-10-10, 02:40 PM   #61
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by Rostok View Post
<snip />
This.

Asking is fine, but spend some time thinking about the issue and try to read into the error. Comparing the solution with the previous code revision is also a smart thing to do .
__________________
「貴方は1人じゃないよ」
  Reply With Quote
08-10-10, 02:42 PM   #62
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
I might not know everything in LUA but i know a few things that i've learned and its pretty new for me ofc, i go ask for help, but since people dont seems like to help they just get annoyed cause im new in it and yes i've tryed alot to try update this layout i've been trying to update this for 2 weeks now.. but since i dont know what to change or what is new or what is not working, or what you can use..
  Reply With Quote
08-10-10, 03:06 PM   #63
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
Perhaps what may assist us to help you is a change in how you ask for help.


Rather than just saying "it didn't work", or "I can't do this" why not try saying:

"I'm trying to do this...

I've tried doing this, this and this, but it has not worked.

Does anyone have any ides on how I can solve this?"


By showing us what you have tried means that we can point you down any roads you may have missed.
  Reply With Quote
08-10-10, 03:21 PM   #64
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Well i tryed alot with the range and the raid SpawnHeader() tryed to look other codes.. and so.. but it didnt work

but since it solved and you guys helped me alot.. the only problem now is really the mana & health text..and i didnt really know this problem with health & mana text would really appear in 1.4 since it did appear today i tryed alot of diffrent things, and looked in to some others layouts.. to look how they did it

Last edited by Aftermathhqt : 08-10-10 at 03:29 PM.
  Reply With Quote
08-10-10, 03:35 PM   #65
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
You will need 2 parts to get the health text working:
1) a custom tag function
2) a fontstring to display the tag information


For the first part you need something like this:
Code:
oUF.Tags['myhealthtext'] = function(unit)
	-- add some functionality here

	return 'a string here'
end
oUF.TagEvents['myhealthtext'] = 'UNIT_HEALTH UNIT_MAXHEALTH'
You'll need to add in code to replicate the functionality that existed in the updateHealth routine.
You will also need to ensure the correct event names are added to oUF.TagEvents['myhealthtext'] for the functionality you implement.
(Check the code in oUF/elements/tags.lua for some hints)


For the second part you need to add a fontstring into your layout function:
Code:
local healthvalue = self:CreateFontString(nil, 'OVERLAY')
	healthvalue:SetFont(font, 18, 'OUTLINE')
	healthvalue:SetPoint('RIGHT', self, 'LEFT', -10, 0)
	healthvalue:SetJustifyH('RIGHT')
	self:Tag(healthvalue, '[myhealthtext]')
You will need to adjust the font setting, position, justification as to your needs.



That is a nice, big step forward, now try and fill in the missing details...
  Reply With Quote
08-10-10, 04:18 PM   #66
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
As yj589794 suggested, I calmed down a little and want to excuse myself. I was a little pissed off by the fact that it seems as you only copy/pasted the suggested solutions and then head back to the board to post the same or the next error.

*sigh*

I'm always willing to help people, but I think I can help you best with pointing you in the right directions, so you can solve your problems yourself. This makes you better, since you learn something about coding this stuff.

I was a bit harsh, though.

Let me detail my "hints" a bit more:
In the API-documentation on WoWWiki you can find nearly every function, that haste has used to create oUF. If something is not working in your layout, you have to find the error. As I stated before, the error-messages are quite useful for this. You must identify in which oUF-module (element) this error occurs. Then just open that file and read through the oUF-code. You will see, which WoW-API-functions haste is using, you can look them up and with little thinking you can understand, what is causing the trouble in your layout. Try this and that, fix it!
Most oUF-stuff is fairly simple, some parts are more difficult.

In 1.4 haste has established a straight forward type of modules (elements): They have an activation (Enable), a deactivation (Disable) and some sort on Update-function.

Look at the Enable-functions. You will notice, what is necessary to make this module work. If your layout fullfills these needs, step over to the Update-function. Have a look on how the Update is done.

Additionally, haste supports various Override-functions in his modules (elements). Most of them are called SOMEPreUpdate() and SOMEPostUpdate(). These are spots, where you can change some of the oUFs behaviour (to be complete: You may override the core Update aswell on some (most) modules).

While modifying your layout, you will encounter, that jasje has used this "hooks" sometimes, latest example would be your health-bar / -text.
__________________
  Reply With Quote
08-11-10, 12:52 AM   #67
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
I honestly don't know poop about Lua, I'm learnin! But I've made my own layout due to Wowprogramming, Wowinterface ( <3 ) as well as other resources ( code skeletons), and I want to say to you, try to google or search before asking questions. It does help. Try looking at other 1.4 layouts as well, before you try to ask Looking at 1.4 layouts will help greatly in your cause and layout.
  Reply With Quote
08-11-10, 04:02 AM   #68
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
[quote=yj589794;202010]


Code:
local healthvalue = self:CreateFontString(nil, 'OVERLAY')
	healthvalue:SetFont(font, 18, 'OUTLINE')
	healthvalue:SetPoint('RIGHT', self, 'LEFT', -10, 0)
	healthvalue:SetJustifyH('RIGHT')
	self:Tag(healthvalue, '[myhealthtext]')
[quote]

that one done atleast... it's just the health tag left... witch i need to redo completly.. i tryed alot to make it work, but i end i got the health done and mana but when i added the mana tag and got it work, the health stopped work any got idea what happend?
  Reply With Quote
08-11-10, 04:10 AM   #69
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
[quote=Game92;202050][quote=yj589794;202010]


Code:
local healthvalue = self:CreateFontString(nil, 'OVERLAY')
	healthvalue:SetFont(font, 18, 'OUTLINE')
	healthvalue:SetPoint('RIGHT', self, 'LEFT', -10, 0)
	healthvalue:SetJustifyH('RIGHT')
	self:Tag(healthvalue, '[myhealthtext]')

that one done atleast... it's just the health tag left... witch i need to redo completly.. i tryed alot to make it work, but i end i got the health done and mana but when i added the mana tag and got it work, the health stopped work any got idea what happend?
without being able to look at your code, no. post up a link and we can try and spot any errors.
  Reply With Quote
08-11-10, 04:15 AM   #70
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Oki ^^ in a sec i will

here it is! http://pastebin.com/feBRnDgK
  Reply With Quote
08-11-10, 04:44 AM   #71
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
when you assign your power tag your are assigning it to the health fontstring you created.
Code:
self:Tag(hpp, '[Afterpower]')
should be
Code:
self:Tag(ppp, '[Afterpower]')


you may need to look at setting some events to update the tags you have created. otherwise it's looking a lot better than before.
  Reply With Quote
08-11-10, 04:49 AM   #72
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Thank you! it works now Its done for 1.4 Thanks everyone for the help..
  Reply With Quote
08-11-10, 04:55 AM   #73
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
Originally Posted by Game92 View Post
Thank you! it works now Its done for 1.4 Thanks everyone for the help..
Good stuff, I knew we could get there eventually.


There is still quite a lot of code left behind that is no longer needed. Now that the functionality is working, try a see where things can be cleaned up.
  Reply With Quote
08-11-10, 05:20 AM   #74
Rostok
A Flamescale Wyrmkin
Join Date: Jul 2008
Posts: 127
I cleaned what i saw :

http://pastebin.com/zH7qRiCb

But try to do it yourself before reading what i did
  Reply With Quote
08-11-10, 09:25 AM   #75
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Thanks but wasnt really needed but thanks anyways
  Reply With Quote
08-11-10, 09:43 AM   #76
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Hmmm.. doenst seem to want to update the power/health so i need change target and target it again to see the real values

but im gonan try a thing first, and see if it's going to work

Last edited by Aftermathhqt : 08-11-10 at 09:46 AM.
  Reply With Quote
08-11-10, 09:47 AM   #77
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
Originally Posted by Game92 View Post
Hmmm.. doenst seem to want to update the power/health so i need change target and target it again to see the real values

but im gonan try a thing first, and see if it's going to work
I did say....

Originally Posted by yj589794 View Post
you may need to look at setting some events to update the tags you have created.
  Reply With Quote
08-11-10, 09:57 AM   #78
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Oh, hmmm then i might have to take a look of this
  Reply With Quote
08-11-10, 10:16 AM   #79
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Im really stuck i have no idea what to do :/
  Reply With Quote
08-11-10, 10:34 AM   #80
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
You've created tags :
Code:
oUF.Tags['Afterhealth'] = function(unit)
        -- functionality here
end
 
oUF.Tags['Afterpower'] = function(unit)
        -- functionality here
end
but you have not told oUF to update the tags when certain events are fired.

for each tag you need to add a line:
Code:
oUF.TagEvents['tagnamehere'] = 'eventshere'
look at the other tags you have that do this, or in oUF\elements\tags.lua for other examples
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Help with 1.4 oUF


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