Modcraft - The community dedicated to quality WoW modding!
Wrath of the Lich King Modding => Miscellaneous => Topic started by: spiderwaseem on April 04, 2014, 05:43:25 pm
-
Hello Guys!
I just finished making another custom race on my server and it gives me this error in game on a different race for some reason.
It gives me the error in the picture below when I click on the Undead.
PICTURE
(http://i.imgur.com/jkRKksl.jpg)
The error says that it is somewhere in the CharacterCreate.lua
So here is my CharacterCreate.lua
LINKS
CharacterCreate.lua - http://pastebin.com/QAWfMRXU (http://pastebin.com/QAWfMRXU" onclick="window.open(this.href);return false;)
So how can I fix this?
can someone fix it for me and then re-upload it to a Pastebin and provide a link?
Please fix it for me or tell me a Newbie Guide for beginners (cuz I dunno lua so much).
If you want to help me in person, then add me on Skype.
My Skype Name : Waseem9116
Thank You! :)
-
It says on line 302 backdropColor is said but is not defined.
If you go to line 302 we see this:
CharacterCreateConfigurationBackground:SetVertexColor(backdropColor[4], backdropColor[5], backdropColor[6]);
You can see backdropColor is indexed at locations 4, 5, and 6. Each time backdropColor is 'nil' so has no value. Thus the error.
If we look up a bit we can see where backdropColor is defined:
-- Set backdrop colors based on faction
local backdropColor = FACTION_BACKDROP_COLOR_TABLE[faction];
So you need to modify where FACTION_BACKDROP_COLOR_TABLE is defined for the faction.
At the top of the file we can see this:
FACTION_BACKDROP_COLOR_TABLE = {
["Alliance"] = {0.5, 0.5, 0.5, 0.09, 0.09, 0.19},
["Horde"] = {0.5, 0.2, 0.2, 0.19, 0.05, 0.05},
};
So there is data for "Alliance" and "Horde" but not whatever you are passing in.
If you add the following line of code on line 297 then it should tell you what is being passed into that table:
message(faction)
You might also want to check if faction is nil.
if not faction then faction = "Alliance"; end
-
It says on line 302 backdropColor is said but is not defined.
If you go to line 302 we see this:
CharacterCreateConfigurationBackground:SetVertexColor(backdropColor[4], backdropColor[5], backdropColor[6]);
You can see backdropColor is indexed at locations 4, 5, and 6. Each time backdropColor is 'nil' so has no value. Thus the error.
If we look up a bit we can see where backdropColor is defined:
-- Set backdrop colors based on faction
local backdropColor = FACTION_BACKDROP_COLOR_TABLE[faction];
So you need to modify where FACTION_BACKDROP_COLOR_TABLE is defined for the faction.
At the top of the file we can see this:
FACTION_BACKDROP_COLOR_TABLE = {
["Alliance"] = {0.5, 0.5, 0.5, 0.09, 0.09, 0.19},
["Horde"] = {0.5, 0.2, 0.2, 0.19, 0.05, 0.05},
};
So there is data for "Alliance" and "Horde" but not whatever you are passing in.
If you add the following line of code on line 297 then it should tell you what is being passed into that table:
message(faction)
You might also want to check if faction is nil.
if not faction then faction = "Alliance"; end
Hmm, I tried to do what you said but I still end up with the same error.
Is it fine if u could try to fix it for me and then re-upload it to Pastebin?
I would really appreciate that.
-
It says on line 302 backdropColor is said but is not defined.
If you go to line 302 we see this:
CharacterCreateConfigurationBackground:SetVertexColor(backdropColor[4], backdropColor[5], backdropColor[6]);
You can see backdropColor is indexed at locations 4, 5, and 6. Each time backdropColor is 'nil' so has no value. Thus the error.
If we look up a bit we can see where backdropColor is defined:
-- Set backdrop colors based on faction
local backdropColor = FACTION_BACKDROP_COLOR_TABLE[faction];
So you need to modify where FACTION_BACKDROP_COLOR_TABLE is defined for the faction.
At the top of the file we can see this:
FACTION_BACKDROP_COLOR_TABLE = {
["Alliance"] = {0.5, 0.5, 0.5, 0.09, 0.09, 0.19},
["Horde"] = {0.5, 0.2, 0.2, 0.19, 0.05, 0.05},
};
So there is data for "Alliance" and "Horde" but not whatever you are passing in.
If you add the following line of code on line 297 then it should tell you what is being passed into that table:
message(faction)
You might also want to check if faction is nil.
if not faction then faction = "Alliance"; end
Hmm, I tried to do what you said but I still end up with the same error.
Is it fine if u could try to fix it for me and then re-upload it to Pastebin?
I would really appreciate that.
It is impossible for it to be the same error if you tried what I said.
-
It says on line 302 backdropColor is said but is not defined.
If you go to line 302 we see this:
CharacterCreateConfigurationBackground:SetVertexColor(backdropColor[4], backdropColor[5], backdropColor[6]);
You can see backdropColor is indexed at locations 4, 5, and 6. Each time backdropColor is 'nil' so has no value. Thus the error.
If we look up a bit we can see where backdropColor is defined:
-- Set backdrop colors based on faction
local backdropColor = FACTION_BACKDROP_COLOR_TABLE[faction];
So you need to modify where FACTION_BACKDROP_COLOR_TABLE is defined for the faction.
At the top of the file we can see this:
FACTION_BACKDROP_COLOR_TABLE = {
["Alliance"] = {0.5, 0.5, 0.5, 0.09, 0.09, 0.19},
["Horde"] = {0.5, 0.2, 0.2, 0.19, 0.05, 0.05},
};
So there is data for "Alliance" and "Horde" but not whatever you are passing in.
If you add the following line of code on line 297 then it should tell you what is being passed into that table:
message(faction)
You might also want to check if faction is nil.
if not faction then faction = "Alliance"; end
Hmm, I tried to do what you said but I still end up with the same error.
Is it fine if u could try to fix it for me and then re-upload it to Pastebin?
I would really appreciate that.
It is impossible for it to be the same error if you tried what I said.
Ok, I tried again and I got this error below.
That is the error I get when I click on the Undead :
http://i.imgur.com/uFIjRfh.jpg (http://i.imgur.com/uFIjRfh.jpg" onclick="window.open(this.href);return false;)
-
It says on line 302 backdropColor is said but is not defined.
If you go to line 302 we see this:
CharacterCreateConfigurationBackground:SetVertexColor(backdropColor[4], backdropColor[5], backdropColor[6]);
You can see backdropColor is indexed at locations 4, 5, and 6. Each time backdropColor is 'nil' so has no value. Thus the error.
If we look up a bit we can see where backdropColor is defined:
-- Set backdrop colors based on faction
local backdropColor = FACTION_BACKDROP_COLOR_TABLE[faction];
So you need to modify where FACTION_BACKDROP_COLOR_TABLE is defined for the faction.
At the top of the file we can see this:
FACTION_BACKDROP_COLOR_TABLE = {
["Alliance"] = {0.5, 0.5, 0.5, 0.09, 0.09, 0.19},
["Horde"] = {0.5, 0.2, 0.2, 0.19, 0.05, 0.05},
};
So there is data for "Alliance" and "Horde" but not whatever you are passing in.
If you add the following line of code on line 297 then it should tell you what is being passed into that table:
message(faction)
You might also want to check if faction is nil.
if not faction then faction = "Alliance"; end
Hmm, I tried to do what you said but I still end up with the same error.
Is it fine if u could try to fix it for me and then re-upload it to Pastebin?
I would really appreciate that.
It is impossible for it to be the same error if you tried what I said.
Ok, I tried again and I got this error below.
That is the error I get when I click on the Undead :
http://i.imgur.com/uFIjRfh.jpg (http://i.imgur.com/uFIjRfh.jpg" onclick="window.open(this.href);return false;)
Nothing is displaying so I guess faction is returning nil.
Try adding this above the message:
if not faction then faction = "Alliance"; end
-
It says on line 302 backdropColor is said but is not defined.
If you go to line 302 we see this:
CharacterCreateConfigurationBackground:SetVertexColor(backdropColor[4], backdropColor[5], backdropColor[6]);
You can see backdropColor is indexed at locations 4, 5, and 6. Each time backdropColor is 'nil' so has no value. Thus the error.
If we look up a bit we can see where backdropColor is defined:
-- Set backdrop colors based on faction
local backdropColor = FACTION_BACKDROP_COLOR_TABLE[faction];
So you need to modify where FACTION_BACKDROP_COLOR_TABLE is defined for the faction.
At the top of the file we can see this:
FACTION_BACKDROP_COLOR_TABLE = {
["Alliance"] = {0.5, 0.5, 0.5, 0.09, 0.09, 0.19},
["Horde"] = {0.5, 0.2, 0.2, 0.19, 0.05, 0.05},
};
So there is data for "Alliance" and "Horde" but not whatever you are passing in.
If you add the following line of code on line 297 then it should tell you what is being passed into that table:
message(faction)
You might also want to check if faction is nil.
if not faction then faction = "Alliance"; end
Hmm, I tried to do what you said but I still end up with the same error.
Is it fine if u could try to fix it for me and then re-upload it to Pastebin?
I would really appreciate that.
It is impossible for it to be the same error if you tried what I said.
Ok, I tried again and I got this error below.
That is the error I get when I click on the Undead :
http://i.imgur.com/uFIjRfh.jpg (http://i.imgur.com/uFIjRfh.jpg" onclick="window.open(this.href);return false;)
Nothing is displaying so I guess faction is returning nil.
Try adding this above the message:
if not faction then faction = "Alliance"; end
ok, So Now it looks like this :
-- Set backdrop colors based on faction
if not faction then faction = "Alliance"; end
message(faction)
local backdropColor = FACTION_BACKDROP_COLOR_TABLE[faction];
local frame;
for index, value in pairs(FRAMES_TO_BACKDROP_COLOR) do
frame = _G[value];
frame:SetBackdropColor(backdropColor[4], backdropColor[5], backdropColor[6]);
end
CharacterCreateConfigurationBackground:SetVertexColor(backdropColor[4], backdropColor[5], backdropColor[6]);
local backgroundFilename = GetCreateBackgroundModel();
SetBackgroundModel(CharacterCreate, backgroundFilename);
end
And in game it gives me this when I click on Undead :
PICTURE : http://i.imgur.com/vwHBNXe.jpg (http://i.imgur.com/vwHBNXe.jpg" onclick="window.open(this.href);return false;)
Any other Ideas?
-
It says on line 302 backdropColor is said but is not defined.
If you go to line 302 we see this:
CharacterCreateConfigurationBackground:SetVertexColor(backdropColor[4], backdropColor[5], backdropColor[6]);
You can see backdropColor is indexed at locations 4, 5, and 6. Each time backdropColor is 'nil' so has no value. Thus the error.
If we look up a bit we can see where backdropColor is defined:
-- Set backdrop colors based on faction
local backdropColor = FACTION_BACKDROP_COLOR_TABLE[faction];
So you need to modify where FACTION_BACKDROP_COLOR_TABLE is defined for the faction.
At the top of the file we can see this:
FACTION_BACKDROP_COLOR_TABLE = {
["Alliance"] = {0.5, 0.5, 0.5, 0.09, 0.09, 0.19},
["Horde"] = {0.5, 0.2, 0.2, 0.19, 0.05, 0.05},
};
So there is data for "Alliance" and "Horde" but not whatever you are passing in.
If you add the following line of code on line 297 then it should tell you what is being passed into that table:
message(faction)
You might also want to check if faction is nil.
if not faction then faction = "Alliance"; end
Hmm, I tried to do what you said but I still end up with the same error.
Is it fine if u could try to fix it for me and then re-upload it to Pastebin?
I would really appreciate that.
It is impossible for it to be the same error if you tried what I said.
Ok, I tried again and I got this error below.
That is the error I get when I click on the Undead :
http://i.imgur.com/uFIjRfh.jpg (http://i.imgur.com/uFIjRfh.jpg" onclick="window.open(this.href);return false;)
Nothing is displaying so I guess faction is returning nil.
Try adding this above the message:
if not faction then faction = "Alliance"; end
ok, So Now it looks like this :
-- Set backdrop colors based on faction
if not faction then faction = "Alliance"; end
message(faction)
local backdropColor = FACTION_BACKDROP_COLOR_TABLE[faction];
local frame;
for index, value in pairs(FRAMES_TO_BACKDROP_COLOR) do
frame = _G[value];
frame:SetBackdropColor(backdropColor[4], backdropColor[5], backdropColor[6]);
end
CharacterCreateConfigurationBackground:SetVertexColor(backdropColor[4], backdropColor[5], backdropColor[6]);
local backgroundFilename = GetCreateBackgroundModel();
SetBackgroundModel(CharacterCreate, backgroundFilename);
end
And in game it gives me this when I click on Undead :
PICTURE : http://i.imgur.com/vwHBNXe.jpg (http://i.imgur.com/vwHBNXe.jpg" onclick="window.open(this.href);return false;)
Any other Ideas?
Looks like it is working to me, if a little hackfixed...
Remove this line to get rid of the debug message:
"message(faction)"
The fact it is displaying a blood elf is because that XML button ID maps to that DBC record.