Script error
Hey folks,
Trying to implement different upgrades to the hives, and thus the corresponding upgrade building but run into a script error when trying to load it up.
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->Script Error #1: lua/TechTree_Server.lua:78: assertion failed!
Call stack:
#1: assert [C]:-1
#2: AddBuildNode lua/TechTree_Server.lua:78
self = TechTree { }
techId = nil
prereq1 = 1
prereq2 = 1
#3: InitTechTree lua/AlienTeam.lua:618
self = AlienTeam { }
#4: OnInitialized lua/PlayingTeam.lua:111
self = AlienTeam { }
#5: OnInitialized lua/AlienTeam.lua:63
self = AlienTeam { }
#6: Reset lua/PlayingTeam.lua:171
self = AlienTeam { }
#7: ResetPreservePlayers lua/Team.lua:230
self = AlienTeam { }
techPoint = TechPoint-1460 {animationGraphIndex=2, attachedId=-1, collisionRep=0, gameEffectsFlags=0, locationEntId=1865, locationId=4, modelIndex=5, occupiedTeam=0, physicsGroup=13, physicsGroupFilterMask=0, physicsType=4, showObjective=0, sighted=0, smashScouted=0, smashed=0, techId=36 }
playersOnTeam = { }
#8: ResetGame lua/NS2Gamerules.lua:509
self = NS2Gamerules-1468 { }
techPoints = {1=TechPoint-226 {animationGraphIndex=2, attachedId=-1, collisionRep=0, gameEffectsFlags=0, locationEntId=1932, locationId=5, modelIndex=5, occupiedTeam=0, physicsGroup=13, physicsGroupFilterMask=0, physicsType=4, showObjective=0, sighted=0, smashScouted=0, smashed=0, techId=36 }, 2=TechPoint-1093 {animationGraphIndex=2, attachedId=-1, collisionRep=0, gameEffectsFlags=0, locationEntId=1196, locationId=11, modelIndex=5, occupiedTeam=0, physicsGroup=13, physicsGroupFilterMask=0, physicsType=4, showObjective=0, sighted=0, smashScouted=0, smashed=0, techId=36 }, 3=TechPoint-1989 {animationGraphIndex=2, attachedId=-1, collisionRep=0, gameEffectsFlags=0, locationEntId=1656, locationId=9, modelIndex=5, occupiedTeam=0, physicsGroup=13, physicsGroupFilterMask=0, physicsType=4, showObjective=0, sighted=0, smashScouted=0, smashed=0, techId=36 } }
resourcePoints = ClassEntityList { }
team1TechPoint = TechPoint-1215 {animationGraphIndex=2, attachedId=-1, collisionRep=0, gameEffectsFlags=0, locationEntId=1691, locationId=2, modelIndex=5, occupiedTeam=0, physicsGroup=13, physicsGroupFilterMask=0, physicsType=4, showObjective=0, sighted=0, smashScouted=0, smashed=0, techId=36 }
team2TechPoint = TechPoint-1460 {animationGraphIndex=2, attachedId=-1, collisionRep=0, gameEffectsFlags=0, locationEntId=1865, locationId=4, modelIndex=5, occupiedTeam=0, physicsGroup=13, physicsGroupFilterMask=0, physicsType=4, showObjective=0, sighted=0, smashScouted=0, smashed=0, techId=36 }
#9: lua/NS2Gamerules.lua:911
self = NS2Gamerules-1468 { }
timePassed = 0.033290255814791<!--QuoteEnd--></div><!--QuoteEEnd-->
Not sure where to go from here, have assigned a unique techId in the AlienTeam script but it's a no go.
Cheers for any suggestions on how to fix this.
Trying to implement different upgrades to the hives, and thus the corresponding upgrade building but run into a script error when trying to load it up.
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->Script Error #1: lua/TechTree_Server.lua:78: assertion failed!
Call stack:
#1: assert [C]:-1
#2: AddBuildNode lua/TechTree_Server.lua:78
self = TechTree { }
techId = nil
prereq1 = 1
prereq2 = 1
#3: InitTechTree lua/AlienTeam.lua:618
self = AlienTeam { }
#4: OnInitialized lua/PlayingTeam.lua:111
self = AlienTeam { }
#5: OnInitialized lua/AlienTeam.lua:63
self = AlienTeam { }
#6: Reset lua/PlayingTeam.lua:171
self = AlienTeam { }
#7: ResetPreservePlayers lua/Team.lua:230
self = AlienTeam { }
techPoint = TechPoint-1460 {animationGraphIndex=2, attachedId=-1, collisionRep=0, gameEffectsFlags=0, locationEntId=1865, locationId=4, modelIndex=5, occupiedTeam=0, physicsGroup=13, physicsGroupFilterMask=0, physicsType=4, showObjective=0, sighted=0, smashScouted=0, smashed=0, techId=36 }
playersOnTeam = { }
#8: ResetGame lua/NS2Gamerules.lua:509
self = NS2Gamerules-1468 { }
techPoints = {1=TechPoint-226 {animationGraphIndex=2, attachedId=-1, collisionRep=0, gameEffectsFlags=0, locationEntId=1932, locationId=5, modelIndex=5, occupiedTeam=0, physicsGroup=13, physicsGroupFilterMask=0, physicsType=4, showObjective=0, sighted=0, smashScouted=0, smashed=0, techId=36 }, 2=TechPoint-1093 {animationGraphIndex=2, attachedId=-1, collisionRep=0, gameEffectsFlags=0, locationEntId=1196, locationId=11, modelIndex=5, occupiedTeam=0, physicsGroup=13, physicsGroupFilterMask=0, physicsType=4, showObjective=0, sighted=0, smashScouted=0, smashed=0, techId=36 }, 3=TechPoint-1989 {animationGraphIndex=2, attachedId=-1, collisionRep=0, gameEffectsFlags=0, locationEntId=1656, locationId=9, modelIndex=5, occupiedTeam=0, physicsGroup=13, physicsGroupFilterMask=0, physicsType=4, showObjective=0, sighted=0, smashScouted=0, smashed=0, techId=36 } }
resourcePoints = ClassEntityList { }
team1TechPoint = TechPoint-1215 {animationGraphIndex=2, attachedId=-1, collisionRep=0, gameEffectsFlags=0, locationEntId=1691, locationId=2, modelIndex=5, occupiedTeam=0, physicsGroup=13, physicsGroupFilterMask=0, physicsType=4, showObjective=0, sighted=0, smashScouted=0, smashed=0, techId=36 }
team2TechPoint = TechPoint-1460 {animationGraphIndex=2, attachedId=-1, collisionRep=0, gameEffectsFlags=0, locationEntId=1865, locationId=4, modelIndex=5, occupiedTeam=0, physicsGroup=13, physicsGroupFilterMask=0, physicsType=4, showObjective=0, sighted=0, smashScouted=0, smashed=0, techId=36 }
#9: lua/NS2Gamerules.lua:911
self = NS2Gamerules-1468 { }
timePassed = 0.033290255814791<!--QuoteEnd--></div><!--QuoteEEnd-->
Not sure where to go from here, have assigned a unique techId in the AlienTeam script but it's a no go.
Cheers for any suggestions on how to fix this.
Comments
Here's my tip to implement something properly...
Pick another TechID from the AlienTeam, and search for it in the project. Look for it's definition in Files like TechData, TechTreeConstants, and also check that you have the file containing loading from somewhere, i.e - Shared.lua or wherever relevant.
It's a fairly simple problem of not adding it into all the neccesary places :D
I did as you suggested and it got me further, although a similar issue has presented itself. I've looked in what I think is every lua file and it's beyond me.
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->Script Error #1: lua/TechData.lua:419: attempt to index global 'Focus' (a nil value)
Call stack:
#1: BuildTechData lua/TechData.lua:419
#2: LookupTechId lua/TechData.lua:570
fieldData = "resource_point"
fieldName = "mapname"
#3: __initmixin lua/TechMixin.lua:28<!--QuoteEnd--></div><!--QuoteEEnd-->
Any further suggestions are welcome!
Cheers
Always means you are trying to call something that isn't available in the code anywhere. First check is always spelling. Beyond that, if you know it is spelt correctly, then the thing you are trying to call is not available in the code, so you have to check the function or variable etc is loaded in the code.
BTW, Combat has focus implemented in it (if focus is the old alien attribute) so you could always rip the code from that, although Combat uses client hooks rather than code editing.