Scope of varibles error - item trader

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Post Reply
AR_Starfighter
Posts: 65
Joined: Thu, 6. Jun 19, 06:02

Scope of varibles error - item trader

Post by AR_Starfighter » Wed, 21. Aug 19, 05:38

Warelist doesn't give any errors. If I add a warelist3 variable in the same positions, I get a variable not found. I have no clue how to fix it. :gruebel:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff>

<add sel="//cue[@name='OnPlatformPopulation_Itemtrader']/actions/remove_value[@name='$TraderDefinition']" pos="before">
        <!--Virtual_Seminar_Traders-->
        <set_value name="$TraderDefinition" list="param.itemtraderlists.shadyguylists" />
        <set_value name="$WareType3" exact="'inventory'" />
        <set_value name="$PlayerChoiceText3" exact="12001" />
        <create_list name="$WareList3"/>

        <do_all exact="$TraderDefinition.count" counter="$i">
          <add_inventory entity="$actor" ware="$TraderDefinition.{$i}.{1}" min="$TraderDefinition.{$i}.{2}" max="$TraderDefinition.{$i}.{3}" chance="$TraderDefinition.{$i}.{4}" />
          <set_value name="$Price" min="$TraderDefinition.{$i}.{1}.minprice" max="$TraderDefinition.{$i}.{1}.maxprice" />
          <append_to_list name="$WareList3" exact="[$TraderDefinition.{$i}.{1}, $Price]"/>
        </do_all>
        <!--Virtual_Seminar_Traders-->

        </add>

<add sel="//cue[@name='OnPlatformPopulation_Itemtrader']/cues/cue[@name='DefaultComm']/actions/do_else/add_player_choice_return[@position='bottom_right']" pos="before">
              <!--Virtual_Seminar_Traders-->
              <do_if value="true" chance="100">
                  <add_player_choice_sub text="'Virtual Seminars'" section="cItemtrader_wares" position="bottom_left" choiceparam="[0, 0, $actor, 'inventory', $WareList3]" baseparam="event.param2" />
              </do_if>
              <!--Virtual_Seminar_Traders-->

              </add>

 </diff>

Post Reply

Return to “X Rebirth - Scripts and Modding”