Snippet GetItemNameById

PurgeandFire

zxcvmkgdfg
Reaction score
508
Nice job, but you can switch around the order of the local declarations to save a line:
JASS:
function GetItemNameById takes integer itemId returns string 
    local item temp = CreateItem(itemId, 0, 0)
    local string name = GetItemName(temp)
    call RemoveItem(temp)
    set temp = null
    return name
endfunction


;)

EDIT: Oh and there is also this function which does the same thing:
JASS:
constant native GetObjectName               takes integer objectId          returns string
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
This proves yet again I am a bit rusty, cant even remember the functions anymore.

No problem, however.

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