My map has been having a lot of fatal errors due to 'out of memory' errors, and I traced the issue down to a single line of JASS code (in a unit indexing system) that looks something like this:
call TriggerRegisterPlayerUnitEvent(CreateTrigger(), Player(12), EVENT_PLAYER_UNIT_ISSUED_ORDER...
Is there any downside to using boolexpr like a trigger, instead of using actual trigger? boolexpr seems to use much less memory than creating a trigger.
The code below works just like Nestharus' Event library: pretty much same fps drop and op limit
When static method in vjass is compiled into jass,
I notice things like
function sc__scope__struct_method takes arguments returns nothing
set f__arg_arg1 = argument 1
set f__arg_arg2 = argument 2
in which st__scope__struct_method...
Hello. I could not think of an appropriate forum to post this question.
I'm looking for a defense with following information:
1. It's a hero defense map; goal is to protect a big ice tomb at base and then move onto offensive mode like X Hero Siege. Overall map is ice terrain
2. There are some...
I really love the struct 'fold' option. However, JNGP seems to have some bugs with it; using private methods disables the folding after like halfway through.
Are there any weird code/bugs generated from using non-private methods? or would it be fine to discard putting 'private' infront of...
I've found this really, really weird glitch with UnitAddItemById.
When it is used in conjunction with RemoveItem() [using some kind of item with same abilities], the item's ability somehow binds to buying unit so that whenever the unit is using an item, the binded ability activates too...
I've found a major flaw with 'channel' (ANcl) skill.
When used, it generates agro on target if its creep.
For instance, an object based storm bolt will cause agro on target after the missile lands and stuns unit for duration.
However, a channel-based storm bolt will cause agro immediately...
i have run into a very strange bug lately
I have no clue what's causing it, but here are the symptoms:
The player can control his units, but most of his spells except some instant cast abilities like blink CANNOT be cast.
In same manners, items cannot be used (click and nothing happens. not...
I thought it might be a good idea to use one effect array.. since you likely won't have 8191 effects in map at once.
library EffectList /* v18.104.22.168
* This system allows you to easily manage and link...
is there a problem with this list?
struct PercentMod extends array
static integer index = 0
method destroyHead takes nothing returns nothing
set .next.prev =...
I have problem saving values to variables retrieved from local player functions. Is there any way to get around this problem?
Below code causes disconnections..
local integer i = 8
set i = i - 1
if GetLocalPlayer() == Player(i) then
Weird bug with spellbook / upgrade
I'm having the strangest bug, and I'm totally stuck because of this bug.
A unit, with some kind of HP(%) upgrade that's level 3+, has a disabled spellbook with an evasion ability added, the unit will instantly die.
I came across this bug after about a...
Very strange handle ID bug
My trigger's handleId is changed when it's fired and I retrieve the id
It is very strange.
What's even more strange is that all triggers created seem to have same handle id when I use GetHandleId(GetTriggeringTrigger())
Seems to be related with the post below...
I have 2 abilities (based on Hero Attribute skill)
They are exactly same, and has ability code 'A01V' and 'A04Q'
Now, if I use the 'A01V' one, it won't show up on hero's spell learning section.
'A000' 'A001' 'A01V' 'A002'
the third icon is missing. I cannot learn it
Question about group recycling
I don't know what to choose between GroupUtils at wc3c.net or Recycle at THW.
Also, how does this stack thingy work?
static method get takes nothing returns group
if .index == 0 then
i did somethig like
and c did not return boolean. this caused my map to bug horribly, like boolean variables returning all false.. timer util saying invalid timers on every single timer... is this supposed to happen?
It seems like when a unit is removed, it is automatically removed from groups as well (I cannot retrieve them with ForGroup; maybe ForGroup simply won't return removed units even if they're in group?)
This is a first time that I actually NEED to detect ghost units because I need to remove...
after hearing that creating texttags with localplayer allows each player to have 100 texttags instead of a global stack, I started using it.
I have a few question though
1. After creating the texttag with GetLocalPlayer, do I have to use functions involving texttag within the local player...
Is it okay to exit in mid of FirstOfGroup loop?
since GroupEnum clears the group everytime
(the group I'm using is global and permanent)
//! runtextmacro GroupMacro("u", "x", "y", "325")
if IsEnemy(u, globalUnit) then...
A vJass system to handle natural movements of units.
Criticism is welcome and appreciated.
Credits to Jesus4Lyf for original ideas.
library Movement requires CTL, Event, UnitIndexer
Combined vJass system managing movements of units.
I have a system dealing with unit movements
i happen to save their coordinates periodically onto variables (all systems changing unit's x/y also change these variables)
would it be better to get their coordinates by just doing
x[unitId] or just use GetUnitX(unit)?
I've been having a strange issue with my map and haven't been able to fix it
Players playing my map would disconnect when the game starts but the strange thing is, it only happens if it isn't your first game in multiplayer since you joined the battle.net (I've tested it with my friends many...
a lot of people seem to be using bj_lastCreatedGroup.. to save a group handle?
I've been thinking
"If I have hundreds of triggers checking itemid of the used item for EVENT_PLAYER_UNIT_USE_ITEM, it would call GetManipulatedItem() hundreds of times everytime an item is used" am I right?
I decided to write this short code so I can reduce the amount I call...
I've been trying to put special abilties into items (mainly passives)
What would be efficient way to do it?
Checking if a unit has the item every time it gets damaged/healed/etc. looks pretty bad
I was going to try to use Nestharus' Event.. but I realized it has no unregister(the special...
My code is glitching and I need some help!
The actions don't work for some reason
library Teleport initializer onInit
//The part that's glitching
//! textmacro CreateMovePoint takes LETTER, moveX, moveY
private function move$LETTER$ takes nothing returns boolean...