Popquiz :D

Kuberr24

Well-Known Member
Reaction score
28
Ok so, when using local variables, how to clean them up correctly?
plz select the right answer A, B, C or D and explain why you use something, why you don't choose something and why you choose that order. thx!

ANSWER A:
local location P
...
call RemoveLocation( P )

ANSWER B:
local location P
...
set P = null

ANSWER C:
local location P
...
call RemoveLocation( P )
set P = null

ANSWER D:
local location P
...
set P = null
call RemoveLocation( P )
 

Exide

I am amazingly focused right now!
Reaction score
448
I'd choose C, if I had to.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
E:

Code:
local location P
call RemoveLocation(P)
set P=null
 

SFilip

Gone but not forgotten
Reaction score
634
Actually that's the same as C.
Which is the correct way BTW.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
> Actually that's the same as C.

I know. I just took out the spaces. :p
 

Exide

I am amazingly focused right now!
Reaction score
448
E:

Code:
local location P
call RemoveLocation(P)
set P=null

But your local is empty, so I'm guessing that there's no real use for it, hence option F;

JASS:

...


is correct!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top