• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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