Discussion Varianles are Pointers?

tooltiperror

Super Moderator
Reaction score
231
JASS:
library_once TEST initializer onInit

	private function onInit takes nothing returns nothing
		local integer x = 0x41    // x   = 65
		local integer ptr = x     // ptr = 65
		set x = 0x42              // x   = 66
		call BJDebugMsg(I2S(ptr)) // ptr = 65
	endfunction 

endlibrary


blasts, it seems variables have their own values.
 

Bribe

vJass errors are legion
Reaction score
67
Pointers == handles != variables

So if you have to set a variable, it is not a handle, it is not a pointer, and re-setting it will do absolutely nil for the other var.
 

DioD

New Member
Reaction score
57
variable is variable.

you were allowed to use pointers with return bug before 124 and get handle,string and real by its pointer (integer)
 

Jedi

New Member
Reaction score
63
That was funny.But that is more funnier.Put this function somewhere and test your map.

JASS:
function OmgWtf takes nothing returns boolean
    //return false
endfunction
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top