1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Variables can't hold strings?

Discussion in 'Skript' started by PantherBoy, Jul 28, 2017.

Tags:
Thread Status:
Not open for further replies.
  1. PantherBoy

    PantherBoy Active Member

    Joined:
    Jul 20, 2017
    Messages:
    72
    Likes Received:
    0
    I have this code:
    Code (Skript):
    1.  
    2. on damage:
    3.     if attacker's tool is a blaze rod named "&5Varázspálca":
    4.         if {B.%attacker%} = tuz:
    5.             if {J.%attacker%} = ures:
    6.                 ignite victim for 5 seconds
    7.             if {J.%attacker%} = tuz:
    8.                 ignite victim for 5 seconds
    9.             if {J.%attacker%} = levego:
    10.                 message "A levegő kioltja a tüzet" to attacker
    11.         if {B.%attacker%} = viz:
    12.             if {J.%attacker%} = ures:
    13.                 message "&9Fulladsz" to victim
    14.                 apply poison to victim for 5 seconds
    15.                 set {_loc.%victim%} to the location 1 meter above the victim
    16.                 drawDot count 10, particle "watersplash", XYZ .2, .2, .2, center {_loc.victim}, visibleRange 320, pulseDelay 0, keepFor 20 ticks
    17.                 set victim's walk speed to 0
    18.                 wait 5 seconds
    19.                 set victim's walk speed to 0.2
    20.             if {J.%attacker%} = viz:
    21.                 message "&9Fulladsz" to victim
    22.                 apply poison to victim for 5 seconds
    23.                 set {_loc.%victim%} to the location 1 meter above the victim
    24.                 drawDot count 10, particle "watersplash", XYZ .2, .2, .2, center {_loc.victim}, visibleRange 320, pulseDelay 0, keepFor 20 ticks
    25.                 set victim's walk speed to 0
    26.                 wait 5 seconds
    27.                 set victim's walk speed to 0.2
    28.         if {B.%attacker%} = fold:
    29.             if {J.%attacker%} = ures:
    30.                 apply blindness to victim for 5 seconds
    31.                 apply poison to victim for 5 seconds
    32.                 set victim's helmet to grass
    33.                 wait 5 seconds
    34.                 set victim's helmet to levego
    35.             if {J.%attacker%} = fold:
    36.                 apply blindness to victim for 5 seconds
    37.                 apply poison to victim for 5 seconds
    38.                 set victim's helmet to grass
    39.                 wait 5 seconds
    40.                 set victim's helmet to levego
    41.         if {B.%attacker%} = levego:
    42.             if {J.%attacker%} = ures:
    43.                 push victim backwards at speed 5
    44.             if {J.%attacker%} = levego:
    45.                 push victim backwards at speed 5
    46.         if {J.%attacker%} = tuz:
    47.             if {B.%attacker%} = ures:
    48.                 ignite victim for 5 seconds
    49.             if {B.%attacker%} = tuz:
    50.                 ignite victim for 5 seconds
    51.         if {J.%attacker%} = viz:
    52.             if {B.%attacker%} = ures:
    53.                 message "&9Fulladsz" to victim
    54.                 apply poison to victim for 5 seconds
    55.                 set {_loc.%victim%} to the location 1 meter above the victim
    56.                 drawDot count 10, particle "vizsplash", XYZ .2, .2, .2, center {_loc.victim}, visibleRange 320, pulseDelay 0, keepFor 20 ticks
    57.                 set victim's walk speed to 0
    58.                 wait 5 seconds
    59.                 set victim's walk speed to 0.2
    60.             if {B.%attacker%} = viz:
    61.                 message "&9Fulladsz" to victim
    62.                 apply poison to victim for 5 seconds
    63.                 set {_loc.%victim%} to the location 1 meter above the victim
    64.                 drawDot count 10, particle "vizsplash", XYZ .2, .2, .2, center {_loc.victim}, visibleRange 320, pulseDelay 0, keepFor 20 ticks
    65.                 set victim's walk speed to 0
    66.                 wait 5 seconds
    67.                 set victim's walk speed to 0.2
    68.         if {J.%attacker%} = fold:
    69.             if {B.%attacker%} = ures:
    70.                 apply blindness to victim for 5 seconds
    71.                 apply poison to victim for 5 seconds
    72.                 set victim's helmet to grass
    73.                 wait 5 seconds
    74.                 set victim's helmet to levego
    75.             if {B.%attacker%} = fold:
    76.                 apply blindness to victim for 5 seconds
    77.                 apply poison to victim for 5 seconds
    78.                 set victim's helmet to grass
    79.                 wait 5 seconds
    80.                 set victim's helmet to levego
    81.         if {J.%attacker%} = levego:
    82.             if {B.%attacker%} = ures:
    83.                 push victim backwards at speed 5
    84.             if {B.%attacker%} = levego:
    85.                 push victim backwards at speed 5
    86.     else:
    87.         cancel event
    88.  
    Code (Skript):
    1.  
    2. And I have a lot of error:
    3.  
    4. [22:16:29 ERROR]: 'tuz' is not an entity type (Wizardsk2.0.sk, line 51: if {B.%attacker%} = tuz:')
    5. [22:16:29 ERROR]: 'viz' is not an entity type (Wizardsk2.0.sk, line 58: if {B.%attacker%} = viz:')
    6. [22:16:29 ERROR]: 'fold' is not an entity type (Wizardsk2.0.sk, line 75: if {B.%attacker%} = fold:')
    7. [22:16:29 ERROR]: 'levego' is not an entity type (Wizardsk2.0.sk, line 88: if {B.%attacker%} = levego:')
    8. [22:16:29 ERROR]: 'tuz' is not an entity type (Wizardsk2.0.sk, line 93: if {J.%attacker%} = tuz:')
    9. [22:16:29 ERROR]: 'viz' is not an entity type (Wizardsk2.0.sk, line 98: if {J.%attacker%} = viz:')
    10. [22:16:29 ERROR]: 'fold' is not an entity type (Wizardsk2.0.sk, line 115: if {J.%attacker%} = fold:')
    11. [22:16:29 ERROR]: 'levego' is not an entity type (Wizardsk2.0.sk, line 128: if {J.%attacker%} = levego:')
    12. [22:16:29 ERROR]: 'tuz' is not an entity type (Wizardsk2.0.sk, line 152: set {J.%player%} to tuz')
    13. [22:16:29 ERROR]: 'viz' is not an entity type (Wizardsk2.0.sk, line 155: set {J.%player%} to viz')
    14. [22:16:29 ERROR]: 'fold' is not an entity type (Wizardsk2.0.sk, line 158: set {J.%player%} to fold')
    15. [22:16:29 ERROR]: 'levego' is not an entity type (Wizardsk2.0.sk, line 161: set {J.%player%} to levego')
    16. [22:16:29 ERROR]: 'ures' is not an entity type (Wizardsk2.0.sk, line 164: set {J.%player%} to ures')
    17. [22:16:30 ERROR]: 'tuz' is not an entity type (Wizardsk2.0.sk, line 167: set {B.%player%} to tuz')
    18. [22:16:30 ERROR]: 'viz' is not an entity type (Wizardsk2.0.sk, line 170: set {B.%player%} to viz')
    19. [22:16:30 ERROR]: 'fold' is not an entity type (Wizardsk2.0.sk, line 173: set {B.%player%} to fold')
    20. [22:16:30 ERROR]: 'levego' is not an entity type (Wizardsk2.0.sk, line 176: set {B.%player%} to levego')
    21. [22:16:30 ERROR]: 'ures' is not an entity type (Wizardsk2.0.sk, line 179: set {B.%player%} to ures')
    22.  
    What is the problem? :emoji_frowning:
    I'm so sad now :emoji_frowning:
     
  2. Best Answer:
    Post #2 by ShaneBee, Jul 28, 2017
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,173
    Likes Received:
    199
    They definitely can, try putting tuz in quotes
    if {variable} = "text string":
    also it makes it a bit easier to read your code and help if you put either in pastebin and post the link or use the insert code option before you post:3
     
    • Winner Winner x 1
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,173
    Likes Received:
    199
    oh, thx. I am tired again :emoji_grinning:
     
    • Friendly Friendly x 1
Thread Status:
Not open for further replies.
Loading...