convert text to item

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

SCS

Member
Oct 14, 2024
1
0
1
24
i have a text parameter and im trying to convert it to a item parameter and idk how
 
I'd love to help you, but I have 0 idea what you're actually trying to achieve. You posted a very open ended, broad statement, could you post some code so I have some idea of what you're trying to do for me to help?
 
i have a text parameter and im trying to convert it to a item parameter and idk how
Alright, I'm just gonna give an example and you can do the rest yourself unless you want to provide more.

I have no idea what you mean by an item paremeter, so I'm just gonna give you this:

Code:
on load:
    set {text} to "cobblestone"
    
on place:
    set {_block} to ({text} parsed as item) # it's an 'on place' event, so I'm pretty sure you'd have to parse it as a block, but I think this works too