skull problem how can I give a skull of a premium player

  • 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 community!

    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!

Status
Not open for further replies.
Feb 24, 2017
191
7
0
foroendertheth.foroactivo.com
I can use attacker's victim's or player's
but If I do like a name of a premium player like this code send me an error

code_language.skript:
command /test:
    trigger:
        give the Hannah4848's skull named "&ePresent&8[&61&8]" to the player
Error:
code_language.skript:
[14:50:18 ERROR]: 'the Hannah4848's skull named "&ePresent&8[&61&8]"' can't be added to a player because the former is neither an item type, an inventory nor an experience point (ayuda.sk, line 12: give the Hannah4848's skull named "&ePresent&8[&61&8]" to the player')
 
I can use attacker's victim's or player's
but If I do like a name of a premium player like this code send me an error

code_language.skript:
command /test:
    trigger:
        give the Hannah4848's skull named "&ePresent&8[&61&8]" to the player
Error:
code_language.skript:
[14:50:18 ERROR]: 'the Hannah4848's skull named "&ePresent&8[&61&8]"' can't be added to a player because the former is neither an item type, an inventory nor an experience point (ayuda.sk, line 12: give the Hannah4848's skull named "&ePresent&8[&61&8]" to the player')
It's your syntax, try this instead:emoji_slight_smile:
code_language.skript:
command /test:
    trigger:
        give ("Hannah4848" parsed as offline player)'s skull named "&ePresent&8[&61&8]" to the player
 
To juice a little extra performance out of this, you can do like this:
code_language.skript:
on script unload:
  delete {head::*}

function head(username: string) :: item:
  if {head::%{_username}%} is not set:
    set {head::%{_username}%} to skull of {_username} parsed as an offline player
  return {head::%{_username}%}

function force_head_regen(username: string) :: item:
  set {head::%{_username}%} to skull of {_username} parsed as an offline player
  return {head::%{_username}%}
 
Status
Not open for further replies.