Results 1 to 12 of 12

Thread: Scripting Error

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Primo's Avatar Protector Domesticus
    Join Date
    Jul 2011
    Location
    Germany
    Posts
    4,007

    Default Scripting Error

    I´ve put this script in the TWScript Editor:
    Code:
    script
    declare_counter Test
    set_counter Test 0
    monitor_event FactionTurnStart FactionIsLocal
    console_command senate_mission_help_player major_reward
    end_monitor
    while I_CompareCounter Test = 0
    end_while
    end_script
    The Editor Accepts everything but the reward. But no other reward is working. Am I making something wrong? Or is this command just not working?

  2. #2
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: Scripting Error

    What error is my program giving since it doesn't check the syntax of console commands or most script commands yet?
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  3. #3
    Primo's Avatar Protector Domesticus
    Join Date
    Jul 2011
    Location
    Germany
    Posts
    4,007

    Default Re: Scripting Error

    Quote Originally Posted by Squid View Post
    What error is my program giving since it doesn't check the syntax of console commands or most script commands yet?
    Error. Line 5 Column 17. Undefined console_command: senate_mission_help_player.
    The script looks like this:

    Code:
    script
    declare_counter Test
    set_counter Test 0
    monitor_event FactionTurnStart FactionIsLocal
    console_command senate_mission_help_player major_reward
    end_monitor
    while I_CompareCounter Test = 0
    end_while
    end_script
    PS: Your programm is correct, the script isnt working.

  4. #4
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: Scripting Error

    It ain't a console command.
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  5. #5
    Primo's Avatar Protector Domesticus
    Join Date
    Jul 2011
    Location
    Germany
    Posts
    4,007

    Default Re: Scripting Error

    Quote Originally Posted by HouseOfHam View Post
    It ain't a console command.
    Then what else it is? And how can I use it correctly?

  6. #6
    Primo's Avatar Protector Domesticus
    Join Date
    Jul 2011
    Location
    Germany
    Posts
    4,007

    Default Re: Scripting Error

    I´ve changed it now to this:
    Code:
    script
    Code:
    
    declare_counter Test
    set_counter Test 0
    monitor_event FactionTurnStart FactionType romans_julii
    senate_mission_help_player major_reward
    end_monitor
    while I_CompareCounter Test = 0
    end_while
    end_script

    TWScript Editor isnt reporting an error - still doesn´t work though. What do I make wrong?

  7. #7
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: Scripting Error

    Its just a script command, remove the console_command keyword from the beginning of the line.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  8. #8
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: Scripting Error

    Description: Issue a senate mission to gift the player with the payback - receipt and notification takes place at the start of the next turn
    Did you end turn?
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  9. #9
    Primo's Avatar Protector Domesticus
    Join Date
    Jul 2011
    Location
    Germany
    Posts
    4,007

    Default Re: Scripting Error

    Quote Originally Posted by HouseOfHam View Post
    Did you end turn?
    I´ve played quite few rounds.
    @Squid I did. Still not working. I´ll post my complete script now, including advisor.

  10. #10
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: Scripting Error

    Use the example payback in the docudemons (one_best_buildable_unit).
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  11. #11
    Primo's Avatar Protector Domesticus
    Join Date
    Jul 2011
    Location
    Germany
    Posts
    4,007

    Default Re: Scripting Error

    My full script:
    Code:
    script
    select_ui_element advisor_dismiss_button
    simulate_mouse_click lclick_up
    while I_AdvisorVisible
    end_while
    suspend_unscripted_advice true
    declare_show_me
    ;console_command toggle_perfect_spy
    
    ;;;
    ;;; --- Forced shutdown ---
    ;;;
    ;;; Press 'Esc' on the campaign map, then click on the '?' button in the
    ;;; menu scroll to terminate the script. You have to do this to be able 
    ;;;to restart a new campaign.
    ;;;
    
    
    monitor_event ScrollAdviceRequested ScrollAdviceRequested end_game_scroll
        terminate_script
    end_monitor
    
    ; Handle saved game reloads
    monitor_event GameReloaded TrueCondition
      terminate_script
    end_monitor
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;; Real start of the Script
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    declare_counter Test
    set_counter Test 0
    monitor_event FactionTurnStart FactionType romans_julii
    senate_mission_help_player major_reward
    end_monitor
    while I_CompareCounter Test = 0
    end_while
    
    
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;; Real End of the Script
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    
    while I_TurnNumber < 99999
      suspend_unscripted_advice true
    end_while
    
    end_script
    Used this already with a 4tpy script, so the other things work. But I will try it now with the best buildable unit.

  12. #12
    Primo's Avatar Protector Domesticus
    Join Date
    Jul 2011
    Location
    Germany
    Posts
    4,007

    Default Re: Scripting Error

    It works now!!! Many thanks to both of you! I would +rep, but I dont have enough posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •