Thread Tools Display Modes
07-30-10, 07:04 AM   #1
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Help with 1.4 oUF

i have this problem with 1.4 with oUF_Jasje anyone know how to fix? cause i have no idea

Code:
Message: Interface\AddOns\oUF\elements\range.lua:34: attempt to index local 'range' (a boolean value)
Time: 07/29/10 00:47:43
Count: 1
Stack: Interface\AddOns\oUF\elements\range.lua:34: in function `enable'
Interface\AddOns\oUF\ouf.lua:263: in function `EnableElement'
Interface\AddOns\oUF\ouf.lua:486: in function <Interface\AddOns\oUF\ouf.lua:414>
(tail call): ?
Interface\AddOns\oUF\ouf.lua:675: in function `Spawn'
Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:956: in main chunk

Locals: self = oUF_Group1 {
Range = true
inRangeAlpha = 1
0 = <userdata>
__tags = <table> {
}
PLAYER_ENTERING_WORLD = <function> defined @Interface\AddOns\oUF\ouf.lua:315
DebuffHighlightFilter = true
unit = "header"
ReadyCheck = <unnamed> {
}
DebuffHighlightBackdrop = true
menu = <function> defined @Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:815
Health = <unnamed> {
}
outsideRangeAlpha = 0.4
RaidIcon = <unnamed> {
}
__elements = <table> {
}
style = "zpRaid"
}
range = true
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index local 'range' (a boolean value)"
_FRAMES = <table> {
}
OnRangeFrame = nil
OnRangeUpdate = <function> defined @Interface\AddOns\oUF\elements\range.lua:11
  Reply With Quote
07-30-10, 07:44 AM   #2
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
In oUF 1.3 the range element used the following variables:
Code:
self.Range = true
self.inRangeAlpha = 1
self.outsideRangeAlpha = 0.5

In oUF 1.4 the range element uses the following variables:
Code:
self.Range = {
	insideAlpha = 1,
	outsideAlpha = 0.5,
}
The existance of a self.Range variable gives implicit enabling of the range element.


Update your layout as required.
  Reply With Quote
07-30-10, 03:53 PM   #3
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
to help abit since i dont know anything about coding etc... here is my hole LUA

http://pastebin.com/musLtFC3
  Reply With Quote
07-30-10, 04:16 PM   #4
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
Originally Posted by Game92 View Post
to help abit since i dont know anything about coding etc...
Don't you think that this would be a perfect time to learn something about coding? Or do you really expect, that we update your layout to 1.4 ?

Since you're using a premade layout, it should be quite easy to modify it for 1.4. Check out wowwiki.com (API and Widget API) to look up the used API-functions.

As you're active here, you will have noticed, that there are many threads considering the 1.3 > 1.4-changes.

If you have specific questions, feel free to ask.
  Reply With Quote
07-30-10, 04:22 PM   #5
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
I pretty much gave you the exact change you need to make to get rid of the error you posted. Do a search on self.Range and you should see where you need to change the code (hint: you need to do it in 2 places).


If you struggle doing that, then you may have to consider re-creating your layout in a unit frame addon that is more friendly to non-programmers.
  Reply With Quote
07-30-10, 05:16 PM   #6
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
I tryed but it didnt work
  Reply With Quote
07-30-10, 06:02 PM   #7
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
ahhh, are you sure about that?

you may have fixed that error but got one for something else! (there are some significant changes between oUF 1.3 and 1.4)

post up the error message and I'll throw a few more hints
  Reply With Quote
07-30-10, 08:05 PM   #8
MoonWitch
A Firelord
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 455
Originally Posted by yj589794 View Post
In oUF 1.3 the range element used the following variables:
Code:
self.Range = true
self.inRangeAlpha = 1
self.outsideRangeAlpha = 0.5

In oUF 1.4 the range element uses the following variables:
Code:
self.Range = {
	insideAlpha = 1,
	outsideAlpha = 0.5,
}
The existance of a self.Range variable gives implicit enabling of the range element.

Update your layout as required.
Thanks for that one, saved me a search through files I completely forgot about self.Range :P
  Reply With Quote
07-31-10, 05:48 AM   #9
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
i get this when i change the range

Code:
Message: Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:956: attempt to call method 'SetManyAttributes' (a nil value)
Time: 07/31/10 13:47:46
Count: 1
Stack: Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:956: in main chunk

Locals: _ = "Druid"
class = "DRUID"
bufftexture = "Interface\AddOns\oUF_Jasje\media\buttonTex"
texture = "Interface\AddOns\oUF_Jasje\media\Cabaret"
texture2 = "Interface\AddOns\oUF_Jasje\media\statusbarTexture"
border = "Interface\AddOns\oUF_Jasje\media\border"
font = "Interface\AddOns\oUF_Jasje\media\font.ttf"
frameborder = "Interface\AddOns\oUF_Jasje\media\frameborder3"
fontsize = 15
height = 27
width = 270
buffsize = 26
castBars = true
castsafeZone = false
playerOnlyDebuffs = true
backdrop = <table> {
 insets = <table> {
 }
 bgFile = "Interface\ChatFrame\ChatFrameBackground"
}
colors = <table> {
 power = <table> {
 }
}
UpdateDruidPower = <function> defined @Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:54
menu = <function> defined @Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:79
ShortValue = <function> defined @Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:91
updateRIcon = <function> defined @Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:106
updateHealth = <function> defined @Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:116
updatePower = <function> defined @Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:150
auraIcon = <function> defined @Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:162
func = <function> defined @Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:174
menu = <function> defined @Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:814
raidlayout = <function> defined @Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:826
raid = <table> {
}
(for index) = 1
(for limit) = 5
(for step) = 1
i = 1
group = oUF_Group1 {
 0 = <userdata>
 __tags = <table> {
 }
 ReadyCheck = <unnamed> {
 }
 Range = <table> {
 }
 unit = "header"
 RaidIcon = <unnamed> {
 }
 __elements = <table> {
 }
 RAID_TARGET_UPDATE = <function> defined @Interface\AddOns\oUF\elements\ricons.lua:7
 menu = <function> defined @Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:814
 UNIT_ENTERED_VEHICLE = <function> defined @Interface\AddOns\oUF\elements\vehicle.lua:4
 DebuffHighlightFilter = true
 UNIT_HAPPINESS = <function> defined @Interface\AddOns\oUF\elements\health.lua:6
 UNIT_FACTION = <function> defined @Interface\AddOns\oUF\elements\health.lua:6
 DebuffHighlightBackdrop = true
 style = "zpRaid"
 UNIT_MAXHEALTH = <function> defined @Interface\AddOns\oUF\elements\health.lua:6
 UNIT_HEALTH = <function> defined @Interface\AddOns\oUF\elements\health.lua:6
 PLAYER_ENTERING_WORLD = <function> defined @Interface\AddOns\oUF\ouf.lua:315
 UNIT_EXITED_VEHICLE = <function> defined @Interface\AddOns\oUF\elements\vehicle.lua:4
 Health = <unnamed> {
 }
}
(*temporary) = nil
(*temporary) = oUF_Group1 {
 0 = <userdata>
 __tags = <table> {
 }
 ReadyCheck = <unnamed> {
 }
 Range = <table> {
 }
 unit = "header"
 RaidIcon = <unnamed> {
 }
 __elements = <table> {
 }
 RAID_TARGET_UPDATE = <function> defined @Interface\AddOns\oUF\elements\ricons.lua:7
 menu = <function> defined @Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:814
 UNIT_ENTERED_VEHICLE = <function> defined @Interface\AddOns\oUF\elements\vehicle.lua:4
 DebuffHighlightFilter = true
 UNIT_HAPPINESS = <function> defined @Interface\AddOns\oUF\elements\health.lua:6
 UNIT_FACTION = <function> defined @Interface\AddOns\oUF\elements\health.lua:6
 DebuffHighlightBackdrop = true
 style = "zpRaid"
 UNIT_MAXHEALTH = <function> defined @Interface\AddOns\oUF\elements\health.lua:6
 UNIT_HEALTH = <function> defined @Interface\AddOns\oUF\elements\health.lua:6
 PLAYER_ENTERING_WORLD = <function> defined @Interface\AddOns\oUF\ouf.lua:315
 UNIT_EXITED_VEHICLE = <function> defined @Interface\AddOns\oUF\elements\vehicle.lua:4
 Health = <unnamed> {
 }
}
(*temporary) = "groupFilter"
(*temporary) = "1"
(*temporary) = "showRaid"
(*temporary) = true
(*temporary) = "yOffset"
(*temporary) = -5
(*temporary) = "attempt to call method 'SetManyAttributes' (a nil value)"
  Reply With Quote
07-31-10, 06:12 AM   #10
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
This has nothing to do with the range-element...

As you can see in this error-message, you got an error in line 956 while calling SetManyAttributes().
In your pastebin, 955 is such a call, so I guess it is this one.

With 1.4, this function is deprecated, haste documented the new Spawn() and SpawnHeader() here.

You simple incorporate the options from SetManyAttributes into a SpawnHeader().
  Reply With Quote
07-31-10, 01:57 PM   #11
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
it didnt work either, am just getting error
  Reply With Quote
07-31-10, 02:04 PM   #12
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
any error message?
  Reply With Quote
08-01-10, 03:49 AM   #13
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
yes this
Code:
Message: Interface\AddOns\oUF\elements\range.lua:34: attempt to index local 'range' (a boolean value)
Time: 08/01/10 11:49:07
Count: 1
Stack: Interface\AddOns\oUF\elements\range.lua:34: in function `enable'
Interface\AddOns\oUF\ouf.lua:263: in function `EnableElement'
Interface\AddOns\oUF\ouf.lua:486: in function <Interface\AddOns\oUF\ouf.lua:414>
(tail call): ?
Interface\AddOns\oUF\ouf.lua:675: in function `Spawn'
Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:954: in main chunk

Locals: self = oUF_Group1 {
 Range = true
 inRangeAlpha = 1
 0 = <userdata>
 __tags = <table> {
 }
 PLAYER_ENTERING_WORLD = <function> defined @Interface\AddOns\oUF\ouf.lua:315
 DebuffHighlightFilter = true
 unit = "header"
 ReadyCheck = <unnamed> {
 }
 DebuffHighlightBackdrop = true
 menu = <function> defined @Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:813
 Health = <unnamed> {
 }
 outsideRangeAlpha = 0.4
 RaidIcon = <unnamed> {
 }
 __elements = <table> {
 }
 style = "zpRaid"
}
range = true
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index local 'range' (a boolean value)"
_FRAMES = <table> {
}
OnRangeFrame = nil
OnRangeUpdate = <function> defined @Interface\AddOns\oUF\elements\range.lua:11
  Reply With Quote
08-01-10, 04:10 AM   #14
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
Again, I'm looking at your pastebin and see in line 791ff, 938ff that you have not included the changes, that were already pointed out to you...

Are you serious about this? You don't seem to read, what is posted here... You will have to change every occurence.

I hope you have a decent text-editor (I recommend notepad++), just use the built-in search function. Make sure to catch every occurence to be changed.

Last edited by Mischback : 08-01-10 at 04:15 AM.
  Reply With Quote
08-01-10, 04:13 AM   #15
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
I dont change in the pastebin, i change in my LUA in my computer.

and why should i change i pastebin? then i cant use it in-game..

and yes i have notepad++

Last edited by Aftermathhqt : 08-01-10 at 04:17 AM.
  Reply With Quote
08-01-10, 04:44 AM   #16
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
The paste is all I have to guess, what is going wrong...

You must learn, how to read an error-message, because all necessary information is in there (k, most of the time).

Code:
Message: Interface\AddOns\oUF\elements\range.lua:34: attempt to index local 'range' (a boolean value)
Time: 08/01/10 11:49:07
Count: 1
Stack: Interface\AddOns\oUF\elements\range.lua:34: in function `enable'
Interface\AddOns\oUF\ouf.lua:263: in function `EnableElement'
Interface\AddOns\oUF\ouf.lua:486: in function <Interface\AddOns\oUF\ouf.lua:414>
(tail call): ?
Interface\AddOns\oUF\ouf.lua:675: in function `Spawn'
Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:954: in main chunk
Line 1 says basically, that oUF has an error in the range.lua, because it tries to access an array/a table which is not there, because the type of the variable is a boolean.

After that, it gives you the "stack" in which order the functions are called. Since oUF is working fine, skip everything until one of your files is called, oUF_Jasje.lua in this case. It gives you the line, where the error is based (this line can be wrong, look some lines around it).

I don't know what is in your line 954, but I guess (based on your pastebin), it could be the wrong usage of the range-element, since in your pastebin there is a wrong usage in 938, so if you inserted something above this, it could have go down the 16 lines offset.
  Reply With Quote
08-02-10, 04:57 AM   #17
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
Game92, I don't know if you've yet given up on trying to update your layout, but if not take a look at this pastey

I have not tested the changes, but it should cover all of the errors you have posted so far.
The changes I have made are highlighted in the pastey, and are covered by the comments Mischback and myself have detailed in the posts we have made in trying to help you.
Make sure you read the code and try to understand why the changes have been made.


If you take the updated code and try it out you may still get errors. In which case make sure you provide as much detail as possible (copy of the code you are running, the exact error message that was received, what you were doing at the time, any other details you can provide that you think may be related)

People are willing to provide help as long as you try to do some things yourself . Posting messages like "I tryed but it didnt work" only end up with those people trying to help you getting frustrated, so please try to provide more detail.
  Reply With Quote
08-02-10, 03:25 PM   #18
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
thanks, i will try this when i come home
  Reply With Quote
08-02-10, 05:46 PM   #19
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Okey, tested got this error.

Code:
Message: Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:1001: Bad argument #2 to 'Spawn' (string expected, got nil
Time: 08/03/10 01:43:51
Count: 1
Stack: [C]: in function `error'
Interface\AddOns\oUF\ouf.lua:14: in function <Interface\AddOns\oUF\ouf.lua:5>
Interface\AddOns\oUF\ouf.lua:664: in function `Spawn'
Interface\AddOns\oUF_Jasje\oUF_Jasje.lua:1001: in main chunk

Locals: (*temporary) = "Bad argument #2 to 'Spawn' (string expected, got nil"
tryed to change somthings didnt go that welll to spawn the raid frames i guess

Last edited by Aftermathhqt : 08-02-10 at 06:06 PM.
  Reply With Quote
08-02-10, 11:37 PM   #20
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
Again, I can only roughly guess based on your pastebin, and since that thing has got less than 1000 lines, I can NOT make ANY educated guess. Give current code or fix your stuff yourself. yj589794 has already pointed out, what is needed to help you. Don't expect us to poke about in a fog.

Your error says, that the second argument to spawn() is not of the expected type, have you changed the spawn-calls to the new syntax, that I already pointed out at you?
__________________
  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