System Advanced Indexing & Data Storage

Azlier

Old World Ghost
Reaction score
461
Hahahaha! You have been screwed over by your own script!
 

Ice Snake

Cool Member
Reaction score
3
Oh sorry, i have a problem with AIDS when I try to save my map
Step 2 (struct) :banghead:
This is problem:
attachment.php
 

Attachments

  • untitled.JPG
    untitled.JPG
    88.3 KB · Views: 561

Kenny

Back for now.
Reaction score
202
You probably need to update JassHelper to allow for static ifs.

If that isn't the reason, it may be some weird bug to do with static ifs.

Edit:

Oooh, nicely done Darth...
 

Ice Snake

Cool Member
Reaction score
3
You probably need to update JassHelper to allow for static ifs.

If that isn't the reason, it may be some weird bug to do with static ifs.

Edit:

Oooh, nicely done Darth...

Oh thanks!

I updated Jasshelper :p
when I review ...last page :p
 

Romek

Super Moderator
Reaction score
963

Azlier

Old World Ghost
Reaction score
461
Still doesn't make GetUnitId perfect. You need to simply check and register units when an order with no target is issued. :)

Then you can pretty much do away with GetUnitIndex. (But don't get rid of it.)
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
ermm.. I have one question:

JASS:
struct myStruct extends array
//! runtextmacro AIDS()

//.... other things
endstruct


so when I want to get the struct myStruct attached to a unit, I just have to:
[LJASS]local myStruct var = myStruct[<A not null unit>][/LJASS]
right ?

---
off: @Romek, Alizer: cool avatar :D
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
I've realized recently that you can use safely an array member inside a struct only if the instance is allocated.
So like all Indexer systems, it's not the case here, so it doesn't matter that the struct needs to extends array.

On the same way, not static members can't have default values, but since you don't allocate an instance it also doesn't matter.

I'm quite surprised nobody said it when i was whining about these lack of features :D
 

grim002

New Member
Reaction score
0
I've realized recently that you can use safely an array member inside a struct only if the instance is allocated.
So like all Indexer systems, it's not the case here, so it doesn't matter that the struct needs to extends array.
Bolded part is false. AutoStruct in AutoIndex actually allocates structs, so they can have default values and may use array members just fine.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
I saw that the maximum amount of units that can be indexed is 8191.
Couldn't you use a hashtable to increase this? It'd be a bit slower, but the functionality would be better, IMO.
Or better yet, keep it the way it is now, and add functionality for hashtables.

Might be completely wrong, but still.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
And for what silly reason you would have more than 8190 units simultaneously on the map ?
Also then it would required the user to use extended structs, pretty lame.
 

Lehona

New Member
Reaction score
12
Why can't I use "set thistype.dx = GetUnitX(thistype.unit) - GetUnitX(thistype.unit)"? (Don't blame me for the result - It's just there to be replaced later on)

JassHelper just says: line xxx - _get_unit is not a static member of AI (the struct's name).
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
Why can't I use "set thistype.dx = GetUnitX(thistype.unit) - GetUnitX(thistype.unit)"? (Don't blame me for the result - It's just there to be replaced later on)

JassHelper just says: line xxx - _get_unit is not a static member of AI (the struct's name).

I'm not sure if you're using this inside a non-static method, but try using 'this' instead of 'thistype'. 'thistype' refers to the struct type, not necessarily any specific instance of the struct. 'this' refers to the inherently passed instance of the struct.
 

Lehona

New Member
Reaction score
12
I use it in a static method and this is not of a type which allows . syntax (says JassHelper).
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Uhh sorry to play a moderator but where is the AIDS question here ?!!
Make a thread.
 
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