| 04-07-2006, 06:43 PM | #1 |
How do i combine theses 2 function? JASS:function Trig_Untitled_Trigger_001_Func001002001002 takes nothing returns boolean return ( GetDestructableTypeId(GetFilterDestructable()) == 'B007' ) endfunction function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing set udg_TempPoint[1] = GetDestructableLoc(RandomDestructableInRectBJ(GetPlayableMapRect(), Condition(function Trig_Untitled_Trigger_001_Func001002001002))) endfunction |
| 04-07-2006, 07:19 PM | #2 |
You can't. The filter needs to be in a seperate function. Also, you have memory leaks in there, but I am not aware if you know that and the above is just an example. Else ask. |
| 04-07-2006, 09:28 PM | #3 |
thank you for your time, just needded to confirm |
| 04-07-2006, 11:57 PM | #4 |
Well, you could create the if statement in the required function and define a tempBoolean. Also, not sure if I am missing something but what is all the hype about over memory leaks. I have experience in two languges (C and Java) and it takes a lot of leaks to even be noticable during runtime. ~Just my 2 Cents~ |
| 04-08-2006, 12:05 AM | #5 | |
Quote:
you obviously dont know what warcraft memory leaks are then |
| 04-08-2006, 12:14 AM | #6 |
While memory leaks are rarely a problem in a one-shot application, a warcraft map may run for 2 hours while things fragment and swap to disk. This is doubly nasty due to all the indirection and abstraction over warcraft objects. I know one guy who disconnects from bnet everytime warcraft's memory usage goes over 250MB. Besides big problems like that, not cleaning up memory can cause crashes when a game ends and a long delay. |
