• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Script Error with H2L Sorter

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,349
I am receiving this error after implementing the http://www.hiveworkshop.com/forums/spells-569/high-low-sorter-v-1-0-2-5-a-240626/?prev=search%3Dsorter%26d%3Dlist%26r%3D20. I already have the "create unknown variables data" checked.

Error.jpg


What am I doing wrong? It's probably something simple. I don't know jass, so maybe I copied the Jass part of the system over wrong?
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
It's no problem. It happens. Glad you found the solution.

I hope you like the system.

Yeah this system is just what I needed in my map. I appreciate you spending the time to develop it. I'm using it for a turn based battle system. I needed to sort out who goes first based on who has the highest "speed" stat. When I finish it I'll let you know. Thanks man.
 
Yeah this system is just what I needed in my map. I appreciate you spending the time to develop it. I'm using it for a turn based battle system. I needed to sort out who goes first based on who has the highest "speed" stat. When I finish it I'll let you know. Thanks man.

Cool I look forward to try it. I love the old style turn based games.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
When 2 or more units have the same speed stat, they are both given the same placement order.

For example:

Fish's custom value = 5
Shark's custom value = 4
Squid's custom value = 3

There is 1 Fish, 1 Shark and 2 Squids (4 units total)

The returned values are:

Fish = 1
Shark = 2
Squid = 4
Squid = 4

I could probably find a workaround to this problem, but I thought I'd let you know of this. Not sure of the best way to go about it. Maybe the first Squid entered gets Number 3 placement while the second Squid registered gets the 4th placement?
 
When 2 or more units have the same speed stat, they are both given the same placement order.

For example:

Fish's custom value = 5
Shark's custom value = 4
Squid's custom value = 3

There is 1 Fish, 1 Shark and 2 Squids (4 units total)

The returned values are:

Fish = 1
Shark = 2
Squid = 4
Squid = 4

I could probably find a workaround to this problem, but I thought I'd let you know of this. Not sure of the best way to go about it. Maybe the first Squid entered gets Number 3 placement while the second Squid registered gets the 4th placement?

Yes that is how this is meant to work as they are the same so they are technically tied for 3rd place but you can't store 2 units at the same index so moving one to 4th is what is needed.
 
Status
Not open for further replies.
Top