Thread: little lua help
View Single Post
11-01-10, 12:57 PM   #10
lorti
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 17
Okay I just tried

Code:
for i,v in pairs({
                MainMenuBarTexture0,
                MainMenuBarTexture1,
                MainMenuBarTexture2,
                MainMenuBarTexture3,
                MainMenuBarLeftEndCap,
                MainMenuBarRightEndCap,
                MainMenuMaxLevelBar0,
                MainMenuMaxLevelBar1,
		MainMenuMaxLevelBar2,
		MainMenuMaxLevelBar3,
		TimeManagerClockButton,
		GameTimeFrame,
		PlayerFrameTexture,
             }) do
                v:SetVertexColor(.35,.35,.35)
             end
And got lua-error

Message: Interface\AddOns\rActionButtonStyler\config.lua:34: attempt to call method 'SetVertexColor' (a nil value)
Time: 11/01/10 21:53:19
Count: 1
Stack: Interface\AddOns\rActionButtonStyler\config.lua:34: in main chunk

Locals: addon = "rActionButtonStyler"
ns = <table> {
}
cfg = <unnamed> {
0 = <userdata>
}
(for generator) = <function> defined =[C]:-1
(for state) = <table> {
1 = MainMenuBarTexture0 {
}
2 = MainMenuBarTexture1 {
}
3 = MainMenuBarTexture2 {
}
4 = MainMenuBarTexture3 {
}
5 = MainMenuBarLeftEndCap {
}
6 = MainMenuBarRightEndCap {
}
7 = MainMenuMaxLevelBar0 {
}
8 = MainMenuMaxLevelBar1 {
}
9 = MainMenuMaxLevelBar2 {
}
10 = MainMenuMaxLevelBar3 {
}
12 = GameTimeFrame {
}
13 = PlayerFrameTexture {
}
}
(for control) = 12
i = 12
v = GameTimeFrame {
0 = <userdata>
timeOfDay = 1191
flashTimer = 0
pendingCalendarInvites = 0
hour = 19
}
(*temporary) = nil
(*temporary) = GameTimeFrame {
0 = <userdata>
timeOfDay = 1191
flashTimer = 0
pendingCalendarInvites = 0
hour = 19
}
(*temporary) = 0.35
(*temporary) = 0.35
(*temporary) = 0.35
(*temporary) = "attempt to call method 'SetVertexColor' (a nil value)"
If I remove red it works fine (changes color of main bar, player frame). How can I fix that?

Last edited by lorti : 11-01-10 at 01:00 PM.
  Reply With Quote