Difference between revisions of "0844"

From GTAMods Wiki
Jump to navigation Jump to search
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<code>0844=1,  %1d%</code><br>
+
{{OpCode
'''Description''': Checks if a string is empty<br>
+
| games      = {{Icon|SA}}
'''Parameter 1''': A string variable<br>
+
| command    = IS_VAR_TEXT_LABEL_EMPTY
'''Supports''': San Andreas<br>
+
| description = Checks if the string is empty
 +
| syntax1    = 0844: &nbsp; string [''global short string var''] empty
 +
| p1t        = [''global short string var'']
 +
| p1d        = Global variable containing a string of up to 7 characters
 +
}}
  
This opcode checks if the string variable passed as the parameter is empty, i.e. contains no characters. If the variable contains only zero bytes the opcode returns true, otherwise it is false.<br>
+
This conditional opcode returns true if the string represented by the global variable is empty, i.e. contains no characters, only zero bytes. Opcodes 0845, 0846, and 0847 behaves similarly to this.
There are the opcodes doing absolutely the same that this opcode does. They are: 0845, 0846, 0847.
 
  
==Keywords==
+
== Keywords ==
string, empty, check
+
string, empty, check, var, text, label
 
 
[[Category:OpCodes]]
 

Latest revision as of 05:17, 22 December 2016

San Andreas IS_VAR_TEXT_LABEL_EMPTY


Description
Checks if the string is empty
Syntax
0844:   string [global short string var] empty
Parameter
[global short string var]
Global variable containing a string of up to 7 characters

This conditional opcode returns true if the string represented by the global variable is empty, i.e. contains no characters, only zero bytes. Opcodes 0845, 0846, and 0847 behaves similarly to this.

Keywords

string, empty, check, var, text, label