[Grimoire] war3err showing false error?

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
JASS:
private function Act takes nothing returns nothing
local location loc = GetSpellTargetLoc()
local BlackHole bh
if GetSpellAbilityId() == SPELL_ID then
    set bh = BlackHole.create(GetSpellAbilityUnit(),GetLocationX(loc),GetLocationY(loc))
endif

call RemoveLocation(loc)
set loc = null
endfunction

//===========================================================================
function InitTrig_BlackHoleJass takes nothing returns nothing
local trigger t = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddAction( t, function Act)
endfunction


This is a part of my code, and I'm sure you don't need other parts of it. The problem only at this point, the function Act.

As you saw, I am clearing leak at the end of the function call RemoveLocation(loc).
Everytime I tested the game, just after the game loaded, I got an error message reads RemoveLocation(null) at function bla_bla_bla_Act.

I know this means I am call RemoveLocation on a nulled variable, but it isn't.
 

13lade619

is now a game developer :)
Reaction score
399
RemoveLocation(null) at function bla_bla_bla_Act.

i think it is caused by periodic point leak removals, while the point variable isnt declared yet.

i had a .3 second periodic trigger and that keeps scrolling through my screen.

just disable grimoire... its a "false" error.

that wont affect the map.
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
I, dont understand what you mean by that.
 

PitzerMike

poo kaka
Reaction score
38
The obvious conclusion would be that GetSpellTargetLoc() returned null in the first place because the ability that fired the trigger didn't have a target, or you had a wait before entering this function and the value got cleared already.

But that would mean that the black hole is created at 0,0 (center of the map). Is that the case?
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
No, my spell is based on Channel and it has a Point as target.

The words shows before I done anything, it just shown up right after the map finish loading. I don't even have the time to cast the spell.
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
Hmm, I think I saw what my problem is.
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
>>You think? phyrex1an's post was clear and correct.
Whats the matter?

After I saw phrex's post, I realised that is that cause. Ofcourse, I need to use my brain to think in order to realise it.

Problem solved, thread closes.
 
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