WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   Help with 1.4 oUF (https://www.wowinterface.com/forums/showthread.php?t=34262)

Aftermathhqt 07-30-10 07:04 AM

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 :D

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


yj589794 07-30-10 07:44 AM

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.

Aftermathhqt 07-30-10 03:53 PM

to help abit since i dont know anything about coding etc... here is my hole LUA

http://pastebin.com/musLtFC3

Mischback 07-30-10 04:16 PM

Quote:

Originally Posted by Game92 (Post 200806)
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.

yj589794 07-30-10 04:22 PM

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.

Aftermathhqt 07-30-10 05:16 PM

I tryed but it didnt work :p

yj589794 07-30-10 06:02 PM

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

MoonWitch 07-30-10 08:05 PM

Quote:

Originally Posted by yj589794 (Post 200752)
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

Aftermathhqt 07-31-10 05:48 AM

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)"


Mischback 07-31-10 06:12 AM

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().

Aftermathhqt 07-31-10 01:57 PM

it didnt work either, am just getting error :(

yj589794 07-31-10 02:04 PM

any error message?

Aftermathhqt 08-01-10 03:49 AM

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


Mischback 08-01-10 04:10 AM

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... :confused: 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.

Aftermathhqt 08-01-10 04:13 AM

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++

Mischback 08-01-10 04:44 AM

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).

Quote:

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.

yj589794 08-02-10 04:57 AM

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.

Aftermathhqt 08-02-10 03:25 PM

thanks, i will try this when i come home ;)

Aftermathhqt 08-02-10 05:46 PM

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

Mischback 08-02-10 11:37 PM

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?


All times are GMT -6. The time now is 10:13 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI