physic variable dosent parsed as integer

  • 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.

Latte_L

Member
Aug 28, 2021
1
0
1
Why i cannot physic conv into integer?
that variable is <none>

this is script:
Code:
on damage: 
    {indamage::%attacker%} is not set
    lore of attacker's tool is set
    cancel event
    set {physicdmglore::%attacker%} to 0
    set {magicdmglore::%attacker%} to 0
    {nospam::%attacker%} is not set
    set {nospam::%attacker%} to true
  
  
  
    loop 1000 times:
        if line {physicdmglore::%attacker%} of lore of attacker's tool contain "&c물리 공격력":
            set {physicdmgbefore::%attacker%} to line {physicdmglore::%attacker%} of lore of attacker's tool
            exit 1 loop
        add 1 to {physicdmglore::%attacker%}
  
    loop 1000 times:
        if line {magicdmglore::%attacker%} of lore of attacker's tool contain "&9마법 공격력":
            set {magicdmgbefore::%attacker%} to line {magicdmglore::%attacker%} of lore of attacker's tool
            exit 1 loop
        add 1 to {magicdmglore::%attacker%}
      
    replace every "&c물리 공격력 +" in {physicdmgbefore::%attacker%} with ""
    replace every "&9마법 공격력 +" in {magicdmgbefore::%attacker%} with ""

    set {physicdmg::%attacker%} to {physicdmgbefore::%attacker%} parsed as integer
    set {magicdmg::%attacker%} to {magicdmgbefore::%attacker%} parsed as integer
  
    send "&cphysicDamage: %{physicdmg::%attacker%}% | %{physicdmgbefore::%attacker%}%" to attacker
    send "&clore line: %{physicdmglore::%attacker%}%" to attacker
    send "&cmagicDamage: %{magicdmg::%attacker%}% | %{magicdmgbefore::%attacker%}%" to attacker
    send "&clore line: %{magicdmglore::%attacker%}%" to attacker
  
    if {inskill::%attacker%} is not set:
        set {indamage::%attacker%} to true
        set {finaledmg::%attacker%} to {physicdmg::%attacker%}
      
      
    else if {inskill::%attacker%} is true:
        set {indamage::%attacker%} to true
        set {finaledmg::%attacker%} to {magicdmg::%attacker%}
        delete {inskill::%attacker%}
      
    make attacker damage victim by {finaledmg::%attacker%} 
    delete {indamage::%attacker%}
    delete {nospam::%attacker%}
  
    send "%{finaledmg::%attacker%}%" to attacker
      
on load:
    delete {inskill::*}


command /testskilltoggle:
    trigger:
        if {inskill::%player%} is true:
            delete {inskill::%player%}
        else if {inskill::%player%} is not set:
            set {inskill::%player%} to true
i only can see the magic dmg
*no errors
 
Status
Not open for further replies.