Difference between revisions of "0009"

From GTAMods Wiki
Jump to navigation Jump to search
(Created page with '{{OpCode | ini = 0009=2,%1d% += %2d% | description = Adds a floating-point value to a global variable. | p1 = global variable | p2 = a floating-point …')
 
Line 1: Line 1:
{{OpCode
+
{{Icon|trilogy}} '''ADD_VAL_TO_FLOAT_VAR'''
| ini        = 0009=2,%1d% += %2d%
+
<hr />
| description = Adds a floating-point value to a global variable
+
'''Description'''
| p1          = global variable
+
: Adds the value stored in the global variable by the specified floating-point value
| p2          = a floating-point value
+
'''Syntax'''
| game        = [[GTA 3]], [[Vice City]], [[San Andreas]]
+
: 0008: [''global var''] += [''float'']
}}
+
: [''global var''] += [''float'']
This opcode adds a floating-point value to the value of a specific global variable. 
+
'''Parameter'''
 +
: [''global var'']
 +
:: Global variable
 +
: [''float'']
 +
:: Floating-point value
  
==Sanny Builder Example==
+
== Keywords ==
 +
global, variable, var, float, add
  
<source lang="scm">0009: $TEMPVAR_FLOAT_1 += 1.741</source>
+
== See also ==
 +
* [[0008]] &ndash; adds global var by int
 +
* [[000A]] &ndash; adds local var by int
 +
* [[000B]] &ndash; adds local var by flt
  
==Keywords==
+
[[Category:OpCodes]][[Category:Math OpCodes]]
global, variable, floating point value, add
 
 
 
[[Category:Math_OpCodes]]
 

Revision as of 21:20, 27 January 2015

GTA III Vice City San Andreas ADD_VAL_TO_FLOAT_VAR


Description

Adds the value stored in the global variable by the specified floating-point value

Syntax

0008: [global var] += [float]
[global var] += [float]

Parameter

[global var]
Global variable
[float]
Floating-point value

Keywords

global, variable, var, float, add

See also

  • 0008 – adds global var by int
  • 000A – adds local var by int
  • 000B – adds local var by flt