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

Text Macro Question

Status
Not open for further replies.
Level 3
Joined
Nov 28, 2008
Messages
24
Hi, there. I'm new in vJass and just wondering if there are any bad effects (like causes game to lag or something....) for using too many textmacros.

And 1 more question.....

JASS:
set Mbi = MultiboardGetItem(Mb, 0, 0)

Must I call MultiboardReleaseItem or just null the variable to clear it?

Appreciate all the help!
 
Last edited:
Textmacros are fine. They are all compiled on map saving, not the actual game itself, so it should be perfectly fine when playing. :) However, just note that more code == higher file size, so you shouldn't have an extremely large amount unless you don't need to worry about the size.

And 1 more question.....

Jass:

set Mbi = MultiboardGetItem(Mb, 0, 0)


Must I call MultiboardReleaseItem or just null the variable to clear it?

Sadly, you must call MultiboardReleaseItem(mbi) and set the variable to null. :( However, you can make simple functions to relieve the stress of modifying multiboard items, such as:
JASS:
function MultiboardSetItemValueEx takes multiboard mb, integer row, integer column, string val returns nothing
    local multiboarditem mbi = MultiboardGetItem(mb, row, column)
    call MultiboardSetItemValue(mbi,val)
    call MultiboardReleaseItem(mbi)
    set mbi = null
endfunction
 
Status
Not open for further replies.
Top