• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Getting the name of an Item-Type

Status
Not open for further replies.
Level 14
Joined
Aug 8, 2010
Messages
1,022
Hello! Is there a Jass script that can return the name of an Item-Type as a string? I mean, i have the Item-Type inside the.. Item-Type variable :hohum: and i just wanna display it's name.
Or i have to create the certain type of item, show it's name and then remove it?

Thanks in advance!
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Hello! Is there a Jass script that can return the name of an Item-Type as a string? I mean, i have the Item-Type inside the.. Item-Type variable :hohum: and i just wanna display it's name.
Or i have to create the certain type of item, show it's name and then remove it?

Thanks in advance!

Wait.. What?

you want to display the rawcode itself? or the name of the item?

  • Custom Script: call BJDebugMsg(I2S(udg_Your_Item_Type))
or to display the name of the rawcode

  • Custom Script: local item i = CreateItem(udg_your_ITEM_type,0,0)
  • Custom Script: local string s = GetItemName(i)
  • Custom Script: call RemoveItem(i)
  • Custom Script: call BJDebugMsg(s)
note that the first trigger will display an integer (193430293, etc)

if u want the ascii code (i043), than you have to use the ASCII lib, which isnt GUI.
 
Last edited:
Status
Not open for further replies.
Top