Jump to content

[LE] Difference between .mod and .setvalue


jim555511

Recommended Posts

So i've been working with global variables a lot recently and i've been wondering which is better to use if you need the global variable to increase and to be able to use that new value in another script. I was also wondering if someone could explain the difference to me between .setvalue and .mod

Link to comment
Share on other sites

In simple terms: SetValue is explicit and ignores whatever the current value is. Mod does what it sounds like, modifies either + or - to the current value by some amount. I believe the Mod function is also designed thread safe where the SetValue and GetValue could have race conditions and is not necessarily thread safe.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...