Help removing memory leaks

M

mxocosa

Guest
Ok I hope this is the right section.

Code:
Custom script:   call RemoveLocation (udg_tmplocationtent[0])
This should be the command to remove a location stored in the variable tmplocation with 0 being the array number. If I want to use "player number" instead of 0 how would I add that?
 
D

dArKzEr0

Guest
GetConvertedPlayerId(player x)

What player number are you using? If it's the triggering player than you can use: GetConvertedPlayerId(GetTriggerPlayer()) or if you're using the owner of a unit you use: GetConvertedPlayerId(GetOwningPlayer(yourUnit))

-darkz
 
M

mxocosa

Guest
yeah I just realised that this probably wasnt enough info ill go read up on jass lol
 
M

mxocosa

Guest
ok sry for dobbel posting but was hoping to learn this fast
Code:
Set messagegroup[(Player number of (Owner of (Casting unit)))] = (Player group((Owner of (Casting unit))))
that should be the set variable action

Code:
Custom script:   call DestroyForce (udg_messagegroup[GetConvertedPlayerId(GetOwningPlayer(EVENT_UNIT_SPELL_CAST))])
is this right? *cross fingers*

EDIT: oh and are there any programs that can check jass code like this for me or is that like way to advance for anyone to care to make on theire spare time?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> Set messagegroup[(Player number of (Owner of (Casting unit)))] = (Player group((Owner of (Casting unit))))

Well, put this line in a trigger,
use "Edit / Convert to custom text",
and have a look.
 
M

mxocosa

Guest
ok another try lol

Code:
call DestroyForce(udg_messagegroup[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))])
hows this?
 
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