• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] How to set unit = null in this situation?

Status
Not open for further replies.
Level 1
Joined
Mar 7, 2016
Messages
5
function XXXX takes group u returns unit
.........
return unit
endfunction
so this function is end in return unit,and can I set unit = null behind it?:ogre_frown:
 
Using bj_ globals might be good, because one does not have exclusivly to create global variables for returning.
How ever, I don't say it would be good practice, but it's still possible that the user doesn't want to get this variable overriden by random systems where he would not expect it.
It has some tiny potential to break some code, if the user does bad practice.
 
Status
Not open for further replies.
Top