multiple conditions in jass

exge

New Member
Reaction score
15
is there a way to make multiple conditions without making a new function .. cos i still dont understand kaTTana's local handle vars ... thx
 

monoVertex

I'm back!
Reaction score
460
It's a bit vague, but...

Code:
function MY_COND takes nothing returns boolean
 return cond1 and cond2
endfunction

This is what you ask?
 

exge

New Member
Reaction score
15
i know that .. i want to make it without making another function .. cos i find it really hard to use local handle vars to allow my locals to be in the other functions

nvm i got something like this

PHP:
loop
set target = GroupPickRandomUnit(targetgrp)
exitwhen ( IsUnitAliveBJ(target) == true ) and ( IsUnitEnemy(target, GetOwningPlayer(caster)) == true )
endloop
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
You don't have to use local vars to pass variable values to other functions, for that you uses parameters (take values, read tutorial).

The 'only' time you must use some kind of handle vars system (or equivalent) is when you must link some data with an object over some time. For example a unit in a timer callback (Unit attached to timer).
 

exge

New Member
Reaction score
15
phyrex1an said:
You don't have to use local vars to pass variable values to other functions, for that you uses parameters (take values, read tutorial).

The 'only' time you must use some kind of handle vars system (or equivalent) is when you must link some data with an object over some time. For example a unit in a timer callback (Unit attached to timer).

i understand the takes part .. thx .. anyway .. i added you on msn ?? but i dun think you accepted
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top