Author Topic: UpdateVars  (Read 787 times)

0 Members and 1 Guest are viewing this topic.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
UpdateVars
« on: January 09, 2008, 06:02:28 pm »
I have always been curious... what does this do exactly?
http://devs.soldat.pl/wiki/index.php/UpdateVars
http://www.enesce.com/help/index.html?Functions/UpdateVars.html
both have an unfinished sentence... "NOTE: If you change a variable, this function will not set it! This just refreshes"

Offline chrisgbk

  • Moderator
  • Veteran
  • *****
  • Posts: 1739
Re: UpdateVars
« Reply #1 on: January 09, 2008, 06:07:31 pm »
I believe that it forces the engine to update the values stored in the global variables the server provides to you; when the scripting engine is running a function, the values don't change inside the scripting engine even if they change in the servers real copy. So for instance, an infinite loop that accesses global variables will always get the same data every loop iteration; this forces it to reload the current data.

Most useful in an infinitely running thread, which as you know is quite buggy.