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.

Multipling in skript not working...

Discussion in 'Skript' started by novastosha, Nov 19, 2019.

Thread Status:
Not open for further replies.
  1. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    Hello, i was wondering why the multipling isn't working

    set {_example} to {variable} * {variable2}

    {variable} = 6
    {variable2} = 8

    Thanks for answers,
    novastosha
     
  2. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    Can you show the part of the code where the variables are set?
     
  3. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    set {price::shop::%player%} to {Shop::Item::%arg 1%::%{_item}%::emoji_stuck_out_tongue:rice} * {amount::shop::%player%}
    --- Double Post Merged, Nov 19, 2019, Original Post Date: Nov 19, 2019 ---
    What??
    --- Double Post Merged, Nov 19, 2019 ---
    Code (Skript):
    1. set {price::shop::%player%} to {Shop::Item::%arg 1%::%{_item}%::Price} * {amount::shop::%player%}
     
  4. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    Well I actually meant the part where the variables you're multiplying are set
     
  5. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    Code (Skript):
    1.  
    2.                 set {amount::shop::%player%} to 1
    3.                 set {price::shop::%player%} to {Shop::Item::%arg 1%::%{_item}%::Price} * {amount::shop::%player%}
    4.  
     
  6. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    How about the other variable (shop item price)
     
  7. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    Code (Skript):
    1. {Shop::Item::%arg 1%::%{_item}%::Price}
     
  8. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    Nevermind. Just send the whole code
     
  9. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    Can you add this debug message right before the multiplication line:
    Code (Text):
    1. broadcast "%{Shop::Item::%arg 1%::%{_item}%::Price}% * %{amount::shop::%player%}% = %{Shop::Item::%arg 1%::%{_item}%::Price} * {amount::shop::%player%}%"
     
  10. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    I tryied everything ;( with this debug but still not working
     
  11. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    What does it output :/
     
Thread Status:
Not open for further replies.

Share This Page

Loading...