[ian-reeds-games] Skill flagging an error when I try to use it for some reason I cannot fathom

  • From: Sharni-Lee Ward <sharni-lee.ward@xxxxxxxxxxx>
  • To: "ian-reeds-games@xxxxxxxxxxxxx" <ian-reeds-games@xxxxxxxxxxxxx>
  • Date: Tue, 2 Aug 2016 08:17:42 +0000

So I was trying to make a skill to summon soldiers onto the map, and I swear 
I've got every flag down, and the one structure that has this skill has all the 
right points, but it's flagging an error and I don't know why. Here's the 
complete contents of the file in question.


Skill
10
|flags
description Summons soldiers to reinforce the army.
tile
range=3
ai_summon
actions_cost=1
summoning_cost=10
sound=soldiers_march
|script_flags
summon_random mage warrior/mage archer
summon_rare_random maravian general
summon_rare_random_chance 10%


Tell me, what the hell is wrong with that? The game doesn't crash, but the 
units aren't summoned. I know the names are spelled correctly and I didn't put 
in underscores where I shouldn't and I checked this file against another with 
the exact same format which works, so I don't know what the heck is going on. 
The error, as retrieved from the speech log:


Error in script.
Calling Context: sm_after_perform
Filename: summoning.js
Line: 28
Column: 10, 11
Object reference not set to an instance of an object.
Noesis.Javascript.JavascriptException: Object reference not set to an instance 
of an object. ---> System.NullReferenceException: Object reference not set to 
an instance of an object.
   at Ian.Tile.CanHold(Unit u) in 
C:\Data\Recent\Games\TacticalBattle\Tile.cs:line 111
   at Ian.TBHM.IsValidDestination(Tile t, Unit u) in 
C:\Data\Recent\Games\TacticalBattle\TBHelperMethods.cs:line 51
   at Ian.Tile.IsValidDestinationFor(Unit u) in 
C:\Data\Recent\Games\TacticalBattle\Tile.cs:line 134
   --- End of inner exception stack trace ---
   at Noesis.Javascript.JavascriptContext.Run(String iScript, String 
iScriptResourceName)
   at Ian.NoesisWrapper.Run(String script, String resourceName) in 
C:\Data\Recent\Games\JSScriptHost\NoesisWrapper.cs:line 14
   at Ian.JSWrapper.Run(IHaveVersion ent, String script, String callingContext) 
in C:\Data\Recent\Games\GameEngine\JS.cs:line 47


Other related posts: