• 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.

[Trigger] Why in the world....

Status
Not open for further replies.
Level 10
Joined
Jan 21, 2007
Messages
576
Distance between Temp_Point[1] and [2] is 1200.

  • Set Temp_String[1] = 30
  • Set Temp_String[2] = (String((Integer((Distance between Temp_Point[1] and Temp_Point[2])))))
  • Set Temp_String[3] = (String((Integer((Distance between Temp_Point[1] and Temp_Point[2])))))
  • Set Temp_String[4] = (Temp_String[1] + (Temp_String[2] + Temp_String[3]))
  • Unit - Set the custom value of (Last created unit) to (Integer(Temp_String[4]))
Temp_String[4] Comes out as 30XXXXBBBB. Where XXXX and BBBB are the same number (as they should be, but there not 1200 like they should.) ex: 12001200. XXXX and BBBB change depending on where I'm standing, wich they shouldnt.

And the unit's custom value comes out as some wierd number they always starts with -12, XXXX and BBBB dont match and are just random numbers.


....Wtf? How does any of that work?

Edit for clarification: Temp_String[4] should come out as 3012001200, same as the unit's custom value, neither do. Something fux up when i merge the variables....
 
Last edited:
Try adding "Game - Display Temp_String" after each one. It might be a concatenation problem or whatever...

Like this:
  • Set Temp_String[1] = 30
  • Game - Display Temp_String[1]
  • Set Temp_String[2] = (String((Integer((Distance between Temp_Point[1] and Temp_Point[2])))))
  • Game - Display Temp_String[2]
  • Set Temp_String[3] = (String((Integer((Distance between Temp_Point[1] and Temp_Point[2])))))
  • Game - Display Temp_String[3]
  • Set Temp_String[4] = (Temp_String[1] + (Temp_String[2] + Temp_String[3]))
  • Game - Display Temp_String[4]
  • Unit - Set the custom value of (Last created unit) to (Integer(Temp_String[4]))
This handy technique is used for testing. It is used TONS of times in JASS for debugging and other issues. It is very useful so make sure that all your stuff are the correct values.

:wink:
 
Level 10
Joined
Jan 21, 2007
Messages
576
Are you serious ghostwolf....

Sooooo beyond lame lol. Anyways then yea that would be the problem =/
 
Status
Not open for further replies.
Top