Scripting: how i reload script file while in game

So how i do reload script file while in game?
there was console cmd for that but i forgot it :(

Comments

  • What's up with the forum server?

    Edit: Apparently, it doesn't like me typing in certain characters. Freaking thing.


    For construction use reload(), for other use compile() and exec().


    God, that was annoying.
  • Don't use reload() unless you've made changes to datablocks within the specific file. Doing so initiates a datablock retransmission to the clients (which lags, and anyone in the process of loading will stall).
  • What Thyth said
  • Eolk triple posted, Burn him!
  • Mel from simpsons?
    So i just type compile(weapons\blah.cs) ?
  • you use exec to actually load the file...
    compile only prepares the file to be loaded (checks syntax, compiles to bytecode, etc...)

    And if you altered datablocks you need to use reload to perpetuate the changes to the clients.

    And yes...that is effectively how you use the functions.
  • I usually just restart my game when doing datablock changes, because reload doesn't always work.
  • I usually just restart my game when doing datablock changes, because reload doesn't always work.

    It has always worked for me... You're just mentally challenged... It's ok Eolk, we still love you.
  • It has always worked for me... You're just mentally challenged... It's ok Eolk, we still love you.
    What does that make you, then? Pile of crap?
  • Yah.. i still tolerate you... <3

    :)
  • I'll have my elks gore you.
  • It has always worked for me... You're just mentally challenged... It's ok Eolk, we still love you.
    I have at least one recent example where resending datablocks would actually break the functionality of a script.

    The engine's implementation of the network protocol doesn't explicitly support sending static data more than once. It doesn't mean that it doesn't work at all, but it is a hack and it does break things.
Sign In or Register to comment.