Login  Register
 



Post new topicReply to topic Go to page 1, 2, 3, 4, 5 ... 10  Next
 
Author Message
 PostPosted: 04 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
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
 Profile  
 PostPosted: 04 Jul, 2011 
 

Joined: 05 Oct, 2007
Posts: 16453
Location: camping near the biggest power-up
Offline
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.
help wrote:
Does anyone know how to use air transports? I cant get them to pick up troops.


Top
 Profile  
 PostPosted: 05 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Thats the thing, I have no idea what Im missing. I looked at the Error, and it shouldnt be happening at all.


Top
 Profile  
 PostPosted: 05 Jul, 2011 
 

Joined: 05 Oct, 2007
Posts: 16453
Location: camping near the biggest power-up
Offline
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.
help wrote:
Does anyone know how to use air transports? I cant get them to pick up troops.


Top
 Profile  
 PostPosted: 05 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
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
 Profile  
 PostPosted: 05 Jul, 2011 
 

Joined: 05 Oct, 2007
Posts: 16453
Location: camping near the biggest power-up
Offline
What UI textures do you use?

_________________
Nephylim wrote:
But, an FA army in an FA environment just looks... right.
help wrote:
Does anyone know how to use air transports? I cant get them to pick up troops.


Top
 Profile  
 PostPosted: 05 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
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
 Profile  
 PostPosted: 05 Jul, 2011 
 

Joined: 05 Oct, 2007
Posts: 16453
Location: camping near the biggest power-up
Offline
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.
help wrote:
Does anyone know how to use air transports? I cant get them to pick up troops.


Top
 Profile  
 PostPosted: 05 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
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
 Profile  
 PostPosted: 05 Jul, 2011 
 

Joined: 05 Oct, 2007
Posts: 16453
Location: camping near the biggest power-up
Offline
Yes, that.

_________________
Nephylim wrote:
But, an FA army in an FA environment just looks... right.
help wrote:
Does anyone know how to use air transports? I cant get them to pick up troops.


Top
 Profile  
 PostPosted: 05 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
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
 Profile  
 PostPosted: 05 Jul, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
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
 Profile  
 PostPosted: 06 Jul, 2011 
 

Joined: 26 Feb, 2009
Posts: 2997
Offline
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
 Profile  
 PostPosted: 08 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
This is my faction.lua

http://pastebin.com/j437ritv

As you can see, it clearly should be working. Unless I am missing something...


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 

Joined: 26 Feb, 2009
Posts: 2997
Offline
Hi,

the next point i would check is that Factions.Factions[Factions.FactionIndexMap[string.lower(bp.General.FactionName)]].VeteranIcon

from

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
 Profile  
 PostPosted: 08 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Domino wrote:
Hi,

the next point i would check is that Factions.Factions[Factions.FactionIndexMap[string.lower(bp.General.FactionName)]].VeteranIcon

from

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
 Profile  
 PostPosted: 08 Jul, 2011 
 

Joined: 26 Feb, 2009
Posts: 2997
Offline
did it return anything?

if not.. repr(Factions.Factions) and see if your Faction is within this table.

_________________
Domino.
______________


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
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
 Profile  
 PostPosted: 08 Jul, 2011 
 

Joined: 26 Feb, 2009
Posts: 2997
Offline
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
 Profile  
 PostPosted: 08 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
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
 Profile  
 PostPosted: 08 Jul, 2011 
 

Joined: 26 Feb, 2009
Posts: 2997
Offline
sure, what did it return , pastebin it..

_________________
Domino.
______________


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
This is what came up: http://pastebin.com/eKuJDX0k


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 

Joined: 26 Feb, 2009
Posts: 2997
Offline
cool,

ok now repr(Factions.Factions[Factions.FactionIndexMap[string.lower(bp.General.FactionName)]].VeteranIcon)

_________________
Domino.
______________


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Doesnt load when I have this in:

Code:
           LOG('*DEBUG: VETERAN UP!', repr(Factions.Factions[Factions.FactionIndexMap[string.lower(bp.General.FactionName)]].VeteranIcon)


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 

Joined: 26 Feb, 2009
Posts: 2997
Offline
your missing a bracket at the end.. )

_________________
Domino.
______________


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic Go to page 1, 2, 3, 4, 5 ... 10  Next



Quick Tools

Search for:
Jump to:  

© 2002-2010 Gas Powered Games Corp. All Rights Reserved. Gas Powered Games is the exclusive trademark of Gas Powered Games Corp.
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
 
Home| Games | Company | News & Press | Support
  Terms of Use   |    Copyright Information   |    Privacy Policy