Recent changes Random page
GAMING
Gaming
 
StarCraft Wiki
Super Smash Wiki
Halopedia
Diablo Wiki
FFXIclopedia
Grand Theft Wiki
See more...

MCom.updateVar

From WoWWiki

Jump to: navigation, search
 

This article is a part of the documentation of the MCom function library

 --[[
   updateVar ( string varname, value [, string vartype, number varmin, number varmax] )
     updates the variable contained in varname, to value.
     Handles things different based on the type of var varname is.
     If it should be a bool, then it only accepts 1 and 0, or -1 to invert the current setting.
     For number, it makes sure it is in the range varmin and varmax.
   
   Args:
     varname - name of the variable to update, wrapped in a string, can be complex like "Something.Variable"
     value - what to set it to, should be 1, 0, or -1 for bool, any number for number type, or any string for string type
 
   Optional: 
     vartype - should be one of the MCOM_ types
     varmin - specifies the minimum value for a number type
     varmax - specifies the maximum value for a number type
  
   Returns:
     if the value changed from its origional value, returns true
 ]]--
Rate this article:
Share this article: