Errors found in vanilla scripts
Posted: Sun, 1. Oct 17, 16:26
Hi, since there is a patch being tested, I thought this could act as a central place for anyone seeing any error coding in the vanilla scripts.
I found one.
I am not an expert in XR script. I am just beginning. I do know programming. I just have to learn this one while I figure out a few bugs that bugs me.
I found one.
Code: Select all
File mining.ship.collect.xml
line 29-42
<!-- Move to destination zone -->
<do_if value="this.ship.zone != $zone">
<debug_text text="'Go mining to zone: ' + $zone.knownname" chance="$debugchance" />
<!-- If the zone to mine is a highway -->
<do_if value="$zone.isclass.highway">
<debug_text text="'Error moving to %1. This zone is a highway'" />
<!-- <resume label="start" /> -->
</do_if>
<run_script name="'move.generic'">
<param name="destination" value="$zone"/>
<param name="endintargetzone" value="true" />
<param name="debugchance" value="$debugchance"/>
</run_script>
</do_if>
explanation:
line 34: missing variable in the debug_text command
Since this is a pretty rare situation to actually happen, probably experienced it.
Found same thing in same file at line 470
<!-- Move to destination zone -->
<do_if value="this.ship.zone != $zone">
<debug_text text="'Go mining to zone: ' + $zone.knownname" chance="$debugchance" />
<!-- If the zone to mine is a highway -->
<do_if value="$zone.isclass.highway">
<debug_text text="'Error moving to %1. This zone is a highway'" />
<!-- <resume label="start" /> -->
</do_if>
Found something else at line 513
<do_if value="$gatherrate" max="0">
<debug_text text="player.age + ' WARNING: gatherrate for %1 in zone %2 is %4'.[$currentware, $zone.knownname, $gatherrate]" chance="$debugchance" />
</do_if>
explanation:
Its using %4 when there are no 4th variables in the list. Should be %3