Sync register

From Unofficial QEdit Wiki Guide
Jump to: navigation, search

Syntax 1

Syntax: sync_register register 1, register 2

  • register1 = Register to use.
  • register2 = Register to copy to register 1.

Syntax 2

Syntax: sync_register register 1, xxxxxxxx

  • register1 = Register to use.
  • xxxxxxxx = Integer to copy to register 1

Use 1

Used to copy registers 2's value to register 1.

Then synchronize the value of register 1 to all clients.

Just like sync_let.

Use 2

Used to copy xxxxxxxx = Integer's value to register 1.

Then synchronize the value of register 1 to all clients.

Just like sync_leti.

Example 1 - Synchronize Register1 = Register2.


100:     leti R1, 00000000 //R1=0
         leti R2, 00000001 //R2=1
         sync_register R1, R2 //Tells all clients that R1 now equals register R2's value (R1=1)
         ret 

or

Example 2 - Synchronize Register1 = xxxxxxxx Integer.


100:     leti R1, 00000000 //R1=0
         sync_register R1, 00000001 //Tells all clients that R1 now equals xxxxxxxx Integer value (R1=1)
         ret 

Also see

let, leti, sync_let, sync_leti, ret