Recent content by lep

  1. L

    Dynamically allocating array size

    There is no direct way to do this, but you've got some choices. First of all, you can use the (dated) Dary system[1]. Or have a look at vJass' dynamic arrays[2]. And at last, there are always Tables[3]. _______ e: i can't get the links inline, so here they are [1]...
  2. L

    Discussion Vertical Pathing System

    Oh welp, that makes it way, way more complex. And normal wc3 pathfinding wouldn't work, but i think that's also an issue for bridges.
  3. L

    Discussion Vertical Pathing System

    It's not really hard. And i must know, since i already did it ;) But go ahead and build it since it's a nice project. Just look at the bridges as rects or regions an check on entering if the unit is high enough. Also, try to allow bridges above other bridges. But i guess that leaving bridge...
  4. L

    Double Free Error: What is this exactly?

    It means, that you destroy an struct instance which was already destroyed previously.
  5. L

    code array. is it possible ?

    No but you can use vjass function interfaces.
  6. L

    Snippet GetNearestUnit

    It is nice that you reuse other libraries but this really is not the fastest way to get the unit(s).
  7. L

    Snippet GetNearestUnit

    Try it yourself. Or tell me where that this comes from in the method shown below taken from the op. Or tell me where it returns some value of type thistype. static method for takes real x, real y, real r, boolexpr c returns thistype local List node local...
  8. L

    Snippet GetNearestUnit

    Maybe it's just me, but your code in the first post does not compile.
  9. L

    Functions calling themselves, +rep for answers

    Nah, Jass supports recursion. So the above will work. It does not support calling a function which was not defined before calling, so smth like this wont work: function even takes integer i returns boolean if i == 0 then return true else return odd(i-1) endif...
  10. L

    W3O File Specification
  11. L

    Using Code for dynamic functions, is it possible? +rep for answers Doesn't work with natives though (or functions in Blizzard.j afair).
  12. L

    Inheritance in JASS Uhm? They do. //Generated allocator of Parent function s__Parent__allocate takes nothing returns integer local integer this=si__Parent_F if (this!=0) then set si__Parent_F=si__Parent_V[this] else set...
  13. L

    Static ifs on Zinc

    module SomeModule{ static method A(){ static if(SomeMethod.exists){ SomeMethod(); } } } :confused:
  14. L

    Snippet Minimum Binary Heap

    Using a heap for n insertions you get a time-complexity of O(n*ln n). Everyone agrees? (Don't know if i use the right terminology, correct me if im wrong.) Now lets consider this: globals unit minUnit real minDist real tmpX real tmpY endglobals function foldl takes nothing...
  15. L

    Snippet Minimum Binary Heap

    But you don't need a heap to do that. Atleast not if you only want the one nearest unit.