Difference between revisions of "BB get number in pack"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Syntax==
 
==Syntax==
''Syntax:'' <span style='font-size:12px;font-family:courier'><span style='color:purple'>BB_get_number_in_pack</span> WW</span>
+
''Syntax:'' <span style='font-size:12px;font-family:courier'><span style='color:purple'>BB_get_number_in_pack</span> register</span>
  
* WW (Reg) = Get number of items in inventory and set register to value
+
* Register = Register to set
  
 
==Use==
 
==Use==
Line 9: Line 9:
 
==Example==
 
==Example==
 
  <span style='font-size:12px;font-family:courier'>
 
  <span style='font-size:12px;font-family:courier'>
  <span style='color:blue'>100:    </span><span style='color:purple'>BB_get_number_in_pack </span> R10 <span style='color:orange'>\\Set R10 to number of items in inventory.</span>
+
  <span style='color:blue'>100:    </span><span style='color:purple'>BB_get_number_in_pack </span> R10 <span style='color:orange'>//Set R10 to number of items in inventory.</span>
  <span style='color:green'>        jmpi_= </span> R10, 0000001E, 101 <span style='color:orange'>\\If R10 equals 30 jump to function 101</span>
+
  <span style='color:green'>        jmpi_= </span>R10, 0000001E, 101 <span style='color:orange'>//If R10 equals 30 jump to function 101</span>
 
  <span style='color:green'>        ret</span>
 
  <span style='color:green'>        ret</span>
 
  <span style='color:blue'>101:    </span><span style='color:green'>message </span>00000050, 'Your inventory is full.'
 
  <span style='color:blue'>101:    </span><span style='color:green'>message </span>00000050, 'Your inventory is full.'
Line 17: Line 17:
 
  </span>
 
  </span>
  
==Related==
+
==Also see==
 
[[jmpiue|jmpi_=]], [[message]], [[ret]], [[mesend]]
 
[[jmpiue|jmpi_=]], [[message]], [[ret]], [[mesend]]

Latest revision as of 07:24, 28 March 2011

Syntax

Syntax: BB_get_number_in_pack register

  • Register = Register to set

Use

Used to count the number of items in your inventory.

Example


100:     BB_get_number_in_pack  R10 //Set R10 to number of items in inventory.
         jmpi_= R10, 0000001E, 101 //If R10 equals 30 jump to function 101
         ret
101:     message 00000050, 'Your inventory is full.'
         mesend
         ret

Also see

jmpi_=, message, ret, mesend