FORUM ARCHIVED

1.0D Script error in Empire Times Event

Discussion in 'Bugs' started by Naffarin, Nov 20, 2016.

  1. Naffarin

    Naffarin Bureaucrat-Inspector Exemplar of The Empire

    This script error causes the event to end without any results:
    [events] rogue_stahlmarkian_ending path_chosen = yes
    [events] rogue_republicain_ending result = success
    [ScriptError] XXX: [string "empire_times_ending|Update"]:37: ERROR(aborting FSM): [string "empire_times_ending|FSM"]:492: first parameter must be less than second
    [ScriptError] [string "empire_times_ending|Update"]:37: ERROR(aborting FSM): [string "empire_times_ending|FSM"]:492: first parameter must be less than second
    [ScriptError] stack traceback:
    [ScriptError] [C]: in function 'scripterror'
    [ScriptError] [string "empire_times_ending|Update"]:37: in function <[string "empire_times_ending|Update"]:2>
    [ScriptError] GameObject: 57630
    [ScriptError] Error: [string "empire_times_ending|Update"]:37: ERROR(aborting FSM): [string "empire_times_ending|FSM"]:492: first parameter must be less than second [ Update | empire_times_ending ]
    [ScriptError] ERROR(aborting FSM): [string "empire_times_ending|FSM"]:492: first parameter must be less than second
    [ScriptError] stack traceback:
    [ScriptError] [string "empire_times_ending|Update"]:37: in function <[string "empire_times_ending|Update"]:2>
    [ScriptError]
    [FSM] FSM: walk_to
    [FSM] FSM: walk_to

    It also causes the mundane director to reissue the event on each possible event starting time (the queued event doesn't seem to be cleared)

    line 493 local pickBuilding = rand (1,columnPersonCount) should actually be
    local pickBuilding = rand (1,columnBuildingCount)

    Fixing this leads to another error
    events] event director mundane received stagename: ending
    [events] no trigger info found for ending
    [events] trigger for next stage = manual
    [events] empire_times_ending started
    [events] rogue_stahlmarkian_ending path_chosen = yes
    [events] rogue_republicain_ending result = success
    [ScriptError] XXX: [string "empire_times_ending|Update"]:37: ERROR(aborting FSM): [string "empire_times_ending|FSM"]:585: attempt to index field 'columnType' (a nil value)
    [ScriptError] [string "empire_times_ending|Update"]:37: ERROR(aborting FSM): [string "empire_times_ending|FSM"]:585: attempt to index field 'columnType' (a nil value)
    [ScriptError] stack traceback:
    [ScriptError] [C]: in function 'scripterror'
    [ScriptError] [string "empire_times_ending|Update"]:37: in function <[string "empire_times_ending|Update"]:2>
    [ScriptError] GameObject: 59308
    [ScriptError] Error: [string "empire_times_ending|Update"]:37: ERROR(aborting FSM): [string "empire_times_ending|FSM"]:585: attempt to index field 'columnType' (a nil value) [ Update | empire_times_ending ]
    [ScriptError] ERROR(aborting FSM): [string "empire_times_ending|FSM"]:585: attempt to index field 'columnType' (a nil value)
    [ScriptError] stack traceback:
    [ScriptError] [string "empire_times_ending|Update"]:37: in function <[string "empire_times_ending|Update"]:2>
    [ScriptError]

    line 586 refers to columnNames.columnType[rand(1,#columnNames[columnType])]
    should be columnNames[columnType][rand(1,#columnNames[columnType])]
     

    Attached Files:

    Last edited: Nov 20, 2016
    Exile likes this.
  2. dbaumgart

    dbaumgart Art Director Staff Member

    Thanks for the very detailed report, logged as OC-5935!
     
    Exile likes this.