Forged Alliance Forever Forged Alliance Forever Forums 2014-08-09T13:35:45+02:00 /feed.php?f=2&t=8319 2014-08-09T13:35:45+02:00 2014-08-09T13:35:45+02:00 /viewtopic.php?t=8319&p=78597#p78597 <![CDATA[Re: Error with New Shield Enhancment]]> Statistics: Posted by brandonpotter0 — 09 Aug 2014, 13:35


]]>
2014-08-07T17:30:28+02:00 2014-08-07T17:30:28+02:00 /viewtopic.php?t=8319&p=78508#p78508 <![CDATA[Re: Error with New Shield Enhancment]]>
Sheeo wrote:
The error is happening in the user lua state (UI). It's trying to do some work with something that's nil

Apparently the shield health isn't getting propagated right from the sim.

At first look the code and the bp seems right. Does the same thing happen with other commander shieldupgrades on your setup?

It does not. I used winmerge and compared the code with the FAF Aeon Shield upgrades, and they are almost identical. Aside from the obvious changes to make it work for the new Cybran model parts, I dont see why its causing the issue :\

Statistics: Posted by brandonpotter0 — 07 Aug 2014, 17:30


]]>
2014-08-07T16:06:06+02:00 2014-08-07T16:06:06+02:00 /viewtopic.php?t=8319&p=78499#p78499 <![CDATA[Re: Error with New Shield Enhancment]]>
Apparently the shield health isn't getting propagated right from the sim.

At first look the code and the bp seems right. Does the same thing happen with other commander shieldupgrades on your setup?

Statistics: Posted by Sheeo — 07 Aug 2014, 16:06


]]>
2014-08-07T12:42:09+02:00 2014-08-07T12:42:09+02:00 /viewtopic.php?t=8319&p=78490#p78490 <![CDATA[Re: Error with New Shield Enhancment]]>
Anaryl wrote:
I don't know lua so well but maybe its calling a local variable instead of a friend/member of the function's parent class? I had a quick look over the code - it would be helpful if you commented in the code where your stuff was

I posted the entire ACU script and BP, and labeled what line the shield info is at...

What other code would you be referring to?

Statistics: Posted by brandonpotter0 — 07 Aug 2014, 12:42


]]>
2014-08-07T12:14:33+02:00 2014-08-07T12:14:33+02:00 /viewtopic.php?t=8319&p=78489#p78489 <![CDATA[Re: Error with New Shield Enhancment]]> Statistics: Posted by Anaryl — 07 Aug 2014, 12:14


]]>
2014-08-07T10:12:37+02:00 2014-08-07T10:12:37+02:00 /viewtopic.php?t=8319&p=78484#p78484 <![CDATA[Re: Error with New Shield Enhancment]]>
Anaryl wrote:
So what does the traceback say "trying to perform arithmetic on a nil value 'shieldmaxhealth, a nil value"

So that strongly suggests that you haven't declared a value for the variable you are trying to perform a function on.


In that case, the error would be undefined variable.

What you're referencing is uninitialized, or just set to nil. Would need to see the code to say why that is.

Statistics: Posted by Sheeo — 07 Aug 2014, 10:12


]]>
2014-08-07T08:24:52+02:00 2014-08-07T08:24:52+02:00 /viewtopic.php?t=8319&p=78477#p78477 <![CDATA[Re: Error with New Shield Enhancment]]>
So that strongly suggests that you haven't declared a value for the variable you are trying to perform a function on.

Statistics: Posted by Anaryl — 07 Aug 2014, 08:24


]]>
2014-08-06T21:28:14+02:00 2014-08-06T21:28:14+02:00 /viewtopic.php?t=8319&p=78465#p78465 <![CDATA[Re: Error with New Shield Enhancment]]>
Gorton wrote:
This is from a mod?
If it is, this should be in general discussions- (sub section useful tools and mods).
Tech Support is for fixing problems with the lobby and base game.
I will move it to there.

Sorry, Didint know any better :)

And if you can move it to general, then Please :-)

This is for my mod that Im trying to make compatible with FAF.

Statistics: Posted by brandonpotter0 — 06 Aug 2014, 21:28


]]>
2014-08-06T19:47:29+02:00 2014-08-06T19:47:29+02:00 /viewtopic.php?t=8319&p=78457#p78457 <![CDATA[Re: Error with New Shield Enhancment]]> If it is, this should be in general discussions- (sub section useful tools and mods).
Tech Support is for fixing problems with the lobby and base game.
I will move it to there.

Statistics: Posted by Gorton — 06 Aug 2014, 19:47


]]>
2014-08-05T18:04:38+02:00 2014-08-05T18:04:38+02:00 /viewtopic.php?t=8319&p=78391#p78391 <![CDATA[Error with New Shield Enhancment]]>
Code:
WARNING: Error running OnFrame script in CScriptObject at 26ea7fc0: ...\faforever\gamedata\lua.nx2\lua\ui\game\unitview.lua(466): attempt to perform arithmetic on local `ShieldMaxHealth' (a nil value)
         stack traceback:
            ...\faforever\gamedata\lua.nx2\lua\ui\game\unitview.lua(466): in function <...\faforever\gamedata\lua.nx2\lua\ui\game\unitview.lua:180>
            ...\faforever\gamedata\lua.nx2\lua\ui\game\unitview.lua(597): in function <...\faforever\gamedata\lua.nx2\lua\ui\game\unitview.lua:594>
            ...\faforever\gamedata\lua.nx2\lua\ui\game\unitview.lua(910): in function `UpdateWindow'
            ...\faforever\gamedata\lua.nx2\lua\ui\game\unitview.lua(879): in function <...\faforever\gamedata\lua.nx2\lua\ui\game\unitview.lua:841


ACU Script - Shield Ench starts at Line 344
http://pastebin.com/RaAEFJxm

ACU BP - Shield Info at 552
http://pastebin.com/mLmEuQGv

Any idea why this happens? The Ench seems to work fine, but when I mouse over the ACU when this upgrade is used/on, the UI throws up errors and doesnt work.

Statistics: Posted by brandonpotter0 — 05 Aug 2014, 18:04


]]>