• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[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.
Back
Top