|
 |
| Author |
Message |
|
brandon007
|
Posted: 04 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
I was just playing my faction for the first time, and I dunno what causes it... Anyone know what causes it? Code: WARNING: Error running OnFrame script in CScriptObject at 05b4d9c0: ...- forged alliance\gamedata\lua.scd\lua\ui\uiutil.lua(309): attempt to concatenate local `filespec' (a nil value) stack traceback: ...- forged alliance\gamedata\lua.scd\lua\ui\uiutil.lua(309): in function `UIFile' ...d alliance\gamedata\lua.scd\lua\ui\game\unitview.lua(278): in function `UpdateWindow' ...d alliance\gamedata\lua.scd\lua\ui\game\unitview.lua(425): in function <...d alliance\gamedata\lua.scd\lua\ui\game\unitview.lua:422>
Last edited by brandon007 on 09 Jul, 2011, edited 1 time in total.
|
|
| Top |
|
 |
|
BulletMagnet
|
Posted: 04 Jul, 2011
|
|
Joined: 05 Oct, 2007 Posts: 16446 Location: camping near the biggest power-up
|
|
The error means that you've done a string concatenation (glueing two bits of text together to make one bit of text) on something that didn't exist.
Basically, I think you've forgotten to make a particular file, or add some factional stuff to a file.
Which file? I don't know, but you should have enough information in the error message to start looking.
_________________
Nephylim wrote: But, an FA army in an FA environment just looks... right. Does anyone know how to use air transports? I cant get them to pick up troops.
|
|
| Top |
|
 |
|
brandon007
|
Posted: 05 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
|
Thats the thing, I have no idea what Im missing. I looked at the Error, and it shouldnt be happening at all.
|
|
| Top |
|
 |
|
BulletMagnet
|
Posted: 05 Jul, 2011
|
|
Joined: 05 Oct, 2007 Posts: 16446 Location: camping near the biggest power-up
|
|
Well it's pretty clear that filespec variable is nil. Make sure you don't have an error prior to this.
_________________
Nephylim wrote: But, an FA army in an FA environment just looks... right. Does anyone know how to use air transports? I cant get them to pick up troops.
|
|
| Top |
|
 |
|
brandon007
|
Posted: 05 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
BulletMagnet wrote: Well it's pretty clear that filespec variable is nil. Make sure you don't have an error prior to this. But My Faction doesnt even touch the file at all. Nothing refers to it at all...
|
|
| Top |
|
 |
|
BulletMagnet
|
Posted: 05 Jul, 2011
|
|
Joined: 05 Oct, 2007 Posts: 16446 Location: camping near the biggest power-up
|
|
What UI textures do you use?
_________________
Nephylim wrote: But, an FA army in an FA environment just looks... right. Does anyone know how to use air transports? I cant get them to pick up troops.
|
|
| Top |
|
 |
|
brandon007
|
Posted: 05 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
BulletMagnet wrote: What UI textures do you use? Just unit Icons, and Faction Icons, and 1 Image to replace the Main Menu Image... Nothing that should effect stuff ingame...
|
|
| Top |
|
 |
|
BulletMagnet
|
Posted: 05 Jul, 2011
|
|
Joined: 05 Oct, 2007 Posts: 16446 Location: camping near the biggest power-up
|
|
I assume you've remembered that everyone has a factional in-game UI.
What textures does your faction use?
_________________
Nephylim wrote: But, an FA army in an FA environment just looks... right. Does anyone know how to use air transports? I cant get them to pick up troops.
|
|
| Top |
|
 |
|
brandon007
|
Posted: 05 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
BulletMagnet wrote: I assume you've remembered that everyone has a factional in-game UI.
What textures does your faction use? You mean a Skin Theme? Im not really sure what you mean...
|
|
| Top |
|
 |
|
BulletMagnet
|
Posted: 05 Jul, 2011
|
|
Joined: 05 Oct, 2007 Posts: 16446 Location: camping near the biggest power-up
|
|
Yes, that.
_________________
Nephylim wrote: But, an FA army in an FA environment just looks... right. Does anyone know how to use air transports? I cant get them to pick up troops.
|
|
| Top |
|
 |
|
brandon007
|
Posted: 05 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
BulletMagnet wrote: Yes, that. It uses the Cybran Theme. I havent touched that at all. It seems to work. I was playing a skirmish with an AI (as UEF) and all was working fine, until the UEF ACU tried to rush my base, and as soon as He destroyed some of my New Faction Units, the Errors appeared...
|
|
| Top |
|
 |
|
Mithy
|
Posted: 05 Jul, 2011
|
|
Joined: 19 Jul, 2009 Posts: 2972
|
The error tells you where it's originating - unitview.lua line 278: Code: controls.vetIcons[i]:SetTexture(UIUtil.UIFile(Factions.Factions[Factions.FactionIndexMap[string.lower(bp.General.FactionName)]].VeteranIcon)) It's not able to find your faction's veteran caret texture. Did you make sure your faction has a VeteranIcon specified, and that you added your faction name to the FactionIndexMap, and verified that all of your units' bp.General.FactionName matches that name in the FactionIndexMap?
|
|
| Top |
|
 |
|
Domino
|
Posted: 06 Jul, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
|
Hi,
Yeah the error in the op pertains to VeteranIcon being a nil value.. in
/lua/factions.lua
the entry VeteranIcon = ... is nil or missing.. from your factions faction table..
and also as milthy says.. every unit in your faction has to have the faction name.. defined in its bp.. where it says in the error.. General.FactionName section.
_________________ Domino. ______________
|
|
| Top |
|
 |
|
brandon007
|
Posted: 08 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
|
| Top |
|
 |
|
Domino
|
Posted: 08 Jul, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
Hi, the next point i would check is that Factions.Factions[Factions.FactionIndexMap[string.lower(bp.General.FactionName)]].VeteranIconfrom Code: controls.vetIcons[i]:SetTexture(UIUtil.UIFile(Factions.Factions[Factions.FactionIndexMap[string.lower(bp.General.FactionName)]].VeteranIcon)) is actually returning something.. the error is originating from uifile, saying that the filespec is nil.. this means that the above is nil.. which leads us to thinking that the faction data is not being inserted into factions table correctly.. OR the above is not looking in the correct place.
_________________ Domino. ______________
|
|
| Top |
|
 |
|
brandon007
|
Posted: 08 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
Domino wrote: Hi, the next point i would check is that Factions.Factions[Factions.FactionIndexMap[string.lower(bp.General.FactionName)]].VeteranIconfrom Code: controls.vetIcons[i]:SetTexture(UIUtil.UIFile(Factions.Factions[Factions.FactionIndexMap[string.lower(bp.General.FactionName)]].VeteranIcon)) is actually returning something.. the error is originating from uifile, saying that the filespec is nil.. this means that the above is nil.. which leads us to thinking that the faction data is not being inserted into factions table correctly.. OR the above is not looking in the correct place. Sooo... What about my factions.lua is wrong?
|
|
| Top |
|
 |
|
Domino
|
Posted: 08 Jul, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
|
did it return anything?
if not.. repr(Factions.Factions) and see if your Faction is within this table.
_________________ Domino. ______________
|
|
| Top |
|
 |
|
brandon007
|
Posted: 08 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
Domino wrote: did it return anything?
The Error only shows up when a Wob unit gains veterancy. Domino wrote: if not.. repr(Factions.Factions) and see if your Faction is within this table.
Uh....Want to try telling me that again in English?
|
|
| Top |
|
 |
|
Domino
|
Posted: 08 Jul, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
ummm, come on brandon, get with the program... you have access to the factions table.. me and mithy have pasted the problem a few times now.. it will take 2 seconds to log the Factions.Factions table.. unitview.lua line 278 Code: controls.vetIcons[i]:SetTexture(UIUtil.UIFile(Factions.Factions[Factions.FactionIndexMap[string.lower(bp.General.FactionName)]].VeteranIcon)) put a log just above that line to repr(Factions.Factions) to make sure your faction is in this table.... in other words look at the data produced in the log from this repr
_________________ Domino. ______________
|
|
| Top |
|
 |
|
brandon007
|
Posted: 08 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
Like this? Code: local veterancyLevels = bp.Veteran or veterancyDefaults for index = 1, 5 do local i = index if info.kills >= veterancyLevels[string.format('Level%d', i)] then controls.vetIcons[i]:Show() LOG('*DEBUG: VETERAN UP!', repr(Factions.Factions)) controls.vetIcons[i]:SetTexture(UIUtil.UIFile(Factions.Factions[Factions.FactionIndexMap[string.lower(bp.General.FactionName)]].VeteranIcon)) else controls.vetIcons[i]:Hide() end end
|
|
| Top |
|
 |
|
Domino
|
Posted: 08 Jul, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
|
sure, what did it return , pastebin it..
_________________ Domino. ______________
|
|
| Top |
|
 |
|
brandon007
|
Posted: 08 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
|
| Top |
|
 |
|
Domino
|
Posted: 08 Jul, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
|
cool,
ok now repr(Factions.Factions[Factions.FactionIndexMap[string.lower(bp.General.FactionName)]].VeteranIcon)
_________________ Domino. ______________
|
|
| Top |
|
 |
|
brandon007
|
Posted: 08 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
Doesnt load when I have this in: Code: LOG('*DEBUG: VETERAN UP!', repr(Factions.Factions[Factions.FactionIndexMap[string.lower(bp.General.FactionName)]].VeteranIcon)
|
|
| Top |
|
 |
|
Domino
|
Posted: 08 Jul, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
|
your missing a bracket at the end.. )
_________________ Domino. ______________
|
|
| Top |
|
 |
 |
 |
|