Looking for a certain flavor of heavy PD

Post here if you want to help developing something for FAF.

Re: Looking for a certain flavor of heavy PD

Postby Uveso » 30 May 2018, 17:08

Just look at the first warning message:
Code: Select all
WARNING: ...\naval unit pack 1.0\lua\blackopseffecttemplates.lua(105): attempt to call field `concatenate' (a nil value)
WARNING: stack traceback:
WARNING:         ...\naval unit pack 1.0\lua\blackopseffecttemplates.lua(105): in main chunk
WARNING:         [C]: in function `doscript'
WARNING:         [C]: in function `pcall'
WARNING:         ...alliance\gamedata\mohodata.scd\lua\system\import.lua(48): in function `import'
WARNING:         ...alliance\gamedata\mohodata.scd\lua\system\import.lua(37): in function `import'
WARNING:         ...er forged alliance\gamedata\lua.scd\lua\sim\unit.lua(3716): in main chunk
WARNING:         [C]: in function `doscript'
WARNING:         [C]: in function `pcall'
WARNING:         ...alliance\gamedata\mohodata.scd\lua\system\import.lua(48): in function `import'
WARNING:         ...alliance\gamedata\mohodata.scd\lua\system\import.lua(37): in function `import'
WARNING:         ...orged alliance\gamedata\lua.scd\lua\defaultunits.lua(11): in main chunk
WARNING:         ...
WARNING:         ...\gamedata\units.scd\units\uel0001\uel0001_script.lua(12): in main chunk
WARNING:         [C]: in function `doscript'
WARNING:         [C]: in function `pcall'
WARNING:         ...alliance\gamedata\mohodata.scd\lua\system\import.lua(48): in function `import'
WARNING:         [C]: in function `CreateInitialArmyUnit'
WARNING:         ...\gamedata\mohodata.scd\lua\sim\scenarioutilities.lua(338): in function `CreateInitialArmyGroup'
WARNING:         ...\gamedata\mohodata.scd\lua\sim\scenarioutilities.lua(469): in function `InitializeArmies'
WARNING:         ...er forged alliance\maps\x1mp_012\x1mp_012_script.lua(4): in function `OnPopulate'
WARNING:         ...orged alliance\gamedata\mohodata.scd\lua\siminit.lua(145): in function <...orged alliance\gamedata\mohodata.scd\lua\siminit.lua:137>
WARNING:         ...orged alliance\gamedata\mohodata.scd\lua\siminit.lua(273): in function `BeginSession'

The only important line is the first line. That's the error message.
All other lines are just a error trace back.

So this is the error:
Code: Select all
WARNING: ...\naval unit pack 1.0\lua\blackopseffecttemplates.lua(105): attempt to call field `concatenate' (a nil value)

This error means, in your modfile called "\naval unit pack 1.0\lua\blackopseffecttemplates.lua" is an error in line 105 (something is wrong with "concatenate")

If you open the the file "\naval unit pack 1.0\lua\blackopseffecttemplates.lua" you will find this line:
Code: Select all
ZCannonHit01 = table.concatenate(ZCannonHit02, ZCannonHit03)

As you see there is a command called:
Code: Select all
table.concatenate()

This command only exist in the SupCom FAF game version. This will not work with the steam game.

The old game and maybe also steam has the command TableCat to merge arrays.
Add to the beginning of the file "\naval unit pack 1.0\lua\blackopseffecttemplates.lua" the following line:
Code: Select all
TableCat = import('utilities.lua').TableCat

Now change the command from
Code: Select all
ZCannonHit01 = table.concatenate(ZCannonHit02, ZCannonHit03)

to
Code: Select all
ZCannonHit01 = TableCat(ZCannonHit02, ZCannonHit03)


Now try again and see if the error in line 105 is gone.
User avatar
Uveso
Supreme Commander
 
Posts: 1137
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 39 times
Been liked: 167 times
FAF User Name: Uveso

Re: Looking for a certain flavor of heavy PD

Postby stardust » 31 May 2018, 00:56

Wow, that's very useful, very much appreciated!

I did a bunch of troubleshooting and had to replace several instances of table.concatenate with TableCat. Also had to import a file that was being referenced but was absent from my file collection. And while my test round worked marvelously well - an AI player was spawned with me and started going about building up a base and military - in FAF, nothing changed. Still no AI player(s)... and yet my log file shows no problems, errors, or warnings of any kind. Most peculiar! Seems like it would either work completely, or still throw me an error, instead of not work with no errors...
User avatar
stardust
Avatar-of-War
 
Posts: 53
Joined: 23 May 2018, 01:25
Location: Canada, eh.
Has liked: 3 times
Been liked: 0 time
FAF User Name: stardust2101

Re: Looking for a certain flavor of heavy PD

Postby Uveso » 31 May 2018, 03:42

Just a guess; maybe you are looking in the wrong place for the game.log ?

The FAF game saves the game.log inside:
Code: Select all
C:\ProgramData\FAForever\logs


Did you searched there ?

(Edit) Don't forget to activate game logging inside the FAF client "Options->Settings->Save game logs"
User avatar
Uveso
Supreme Commander
 
Posts: 1137
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 39 times
Been liked: 167 times
FAF User Name: Uveso

Re: Looking for a certain flavor of heavy PD

Postby stardust » 31 May 2018, 13:16

I did not. I looked through it though and don't recognize anything outright as a problem though... I've attached the log for good measure.
Attachments
game.uid.8014909.log
(118.02 KiB) Downloaded 14 times
User avatar
stardust
Avatar-of-War
 
Posts: 53
Joined: 23 May 2018, 01:25
Location: Canada, eh.
Has liked: 3 times
Been liked: 0 time
FAF User Name: stardust2101

Re: Looking for a certain flavor of heavy PD

Postby Uveso » 31 May 2018, 16:05

The first error is:
Code: Select all
warning: SCR_LuaDoFileConcat: Loading "c:\users\stardust\documents\my games\gas powered games\supreme commander forged alliance\mods\naval unit pack 1.0\lua\customunits\seafrigate1.lua" failed: ...forged alliance\mods\naval unit pack 1.0\lua\customunits\seafrigate1.lua(4): `)' expected near `,'

That means, in your mod file "seafrigate1.lua" is a syntax error in line 4:
Code: Select all
`)' expected near `,'


The next error is stopping the game:
Code: Select all
warning: BeginSession() failed: ...aforever\gamedata\lua.nx2\lua\ai\sorianutilities.lua(417): access to nonexistent global variable "UnitList"

While executing the function "BeginSession()" we got an error inside the file sorianutilities.lua while calling the function "AddCustomUnitSupport()" (that's at line 417)

I bet this error is because we have an error inside a custom unit -> seafrigate1.lua

last error:
Code: Select all
warning: Error running lua script: ...amedata\lua.nx2\lua\ai\aiarchetype-managerloader.lua(52): attempt to call method `HasBuilderList' (a nil value)
         stack traceback:
            ...amedata\lua.nx2\lua\ai\aiarchetype-managerloader.lua(52): in function `ExecutePlan'
            ...ogramdata\faforever\gamedata\lua.nx2\lua\aibrain.lua(804): in function `ExecutePlan'
            ...ogramdata\faforever\gamedata\lua.nx2\lua\aibrain.lua(775): in function `EvaluateAIPlanList'
            ...ogramdata\faforever\gamedata\lua.nx2\lua\aibrain.lua(750): in function <...ogramdata\faforever\gamedata\lua.nx2\lua\aibrain.lua:741>

Hard to say if this error is also related to the broken unit.
The function call has its source in aibrain.lua. And aibrain.lua is hooked from the mod Start with SCU
Code: Select all
info: Hooked /lua/aibrain.lua with /mods/startwithscu/hook/lua/aibrain.lua


I suggest to fix first the broken unit, then check if the last error still exist. If yes disable the mod startwithscu.
User avatar
Uveso
Supreme Commander
 
Posts: 1137
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 39 times
Been liked: 167 times
FAF User Name: Uveso

Re: Looking for a certain flavor of heavy PD

Postby stardust » 01 Jun 2018, 01:50

WMAHAHA IT WORKS

Turns out that the seafrigate1.lua file is completely redundant. Removing it fixed the last bug. GLORIOUS!

Thank you all for your assistance! Now to conquer the oceans! :)
User avatar
stardust
Avatar-of-War
 
Posts: 53
Joined: 23 May 2018, 01:25
Location: Canada, eh.
Has liked: 3 times
Been liked: 0 time
FAF User Name: stardust2101

Re: Looking for a certain flavor of heavy PD

Postby stardust » 05 Aug 2018, 20:47

Hunting for another unit here. Don't remember what it's called or what mod it was from. It LOOKED like two UEF frigates glued together along their ventral hulls, and was built from the UEF quantum gateway. It was some sort of flying/orbital spaceship. Been through my entire mod stash and haven't found it. Does this ring any bells with anyone?
User avatar
stardust
Avatar-of-War
 
Posts: 53
Joined: 23 May 2018, 01:25
Location: Canada, eh.
Has liked: 3 times
Been liked: 0 time
FAF User Name: stardust2101

Previous

Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest