Results 1 to 5 of 5

Thread: multiplying multi?

  1. #1
    Join Date
    Jul 2007
    Location
    Pluto... Maybe?
    Posts
    198
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default multiplying multi?

    Just wondering how do i multiply multiple things? e.g:

    lets say 1 fish is worth 50gp and we have a net in our inv, so we can only hold 27 fish per inv now how would we do this?

    Money := 27*Loadsdone(a var would be here)*Price of fish(var would be here here)

    so it could be like

    Code:
    Money := 27*Loads*Price; //Price would hold the item price gotten from the G.E somehow
    but how can i do that in scar?

  2. #2
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Worth := (27 * Loads) * Price

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  3. #3
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Quote Originally Posted by rogeruk View Post
    SCAR Code:
    Worth := (27 * Loads) * Price
    The brackets aren't needed there, but that's just me being picky
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  4. #4
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Its keeping the code tidy so you know what you are doing. You multiply the loads by the invcount which gives you total fish, then you multiply by price to give you total price.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  5. #5
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by pl0xmypl0x View Post
    Code:
    Money := 27*Loads*Price; //Price would hold the item price gotten from the G.E somehow
    but how can i do that in scar?
    You just did it in SCAR
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •