• 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.

[vJASS] Quick Question about Table

Status
Not open for further replies.
Level 15
Joined
Nov 30, 2007
Messages
1,202
Can this method:

JASS:
        static method getPool takes integer unitTypeId returns thistype
            if (typeTable.has(unitTypeId) then
                return typeTable[unitTypeId]
            endif
            return 0
        endmethod
... be replaced with this?

JASS:
      static method getPool takes integer unitTypeId returns thistype
            return typeTable[unitTypeId]
        endmethod
As it returns 0 if it doesn't exist right? Thanks in advance.
 
Status
Not open for further replies.
Top