Talk:Cookbook:Reloading modules at runtime

From BF2 Technical Information Wiki
Jump to: navigation, search

Alternate solution: type "pythonHost.reinitialize" at the console and it will reload your latest scripts --SuperB

  • Well, except this doesn't work on anything except ranked servers, so it's rather pointless for the majority of us. --Dackz 01:41, 28 Aug 2005 (MDT)
  • You can also use pythonHost.reinitialize in the console in the debug build, but I've only had it crash on me. I'm not sure if it works correctly on ranked servers, though. --King of Camelot 02:11, 28 Aug 2005 (MDT)
  • I'm always using pythonhost.reinitialize with the bf2 debug exe (bf2_r.exe) when writing & debugging python scripts, and it works flawless for me. It catches all exceptions to stdout and no more CTD's on indentation errors or typo's. Saves you the hassle of reloading the entire map. --=Mad= 02:26, 28 Aug 2005 (MDT)
  • Just tried pythonHost.reinitialize in the debug build again, appears to work fro me now, not sure why it didn't work before. The release of the debug build and this command makes this cookbook obsolete now, but at the time of its writing it was the best I could find to reload Python scripts. --King of Camelot 02:30, 28 Aug 2005 (MDT)
    • Of course, because people only write scripts for the client and no one ever runs server-side scripts and ever needs to reload them without disconnecting all of their players! --Dackz 16:27, 28 Aug 2005 (MDT)
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox