Thread: value error help will rep+

Results 1 to 6 of 6
  1. #1 value error help will rep+ 
    im 12 idk what this is.

    Join Date
    Jul 2013
    Posts
    233
    Thanks given
    39
    Thanks received
    4
    Rep Power
    18
    hello runeserver, im trying to add this npc gambler to my server https://www.rune-server.ee/runescape...718-742-a.html but i get this error idk how to fx, pls help
    https://gyazo.com/18adfea352d160543d7e4b335a9de3a1
    https://gyazo.com/f252ab2541b5f6196794e060d1d196c5
    Reply With Quote  
     

  2. #2  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    These are dummy variables. You need to change them to whatever the equivalent is in your source (player.getinv.getitem(cashid))...
    Project thread
    Reply With Quote  
     

  3. #3  
    im 12 idk what this is.

    Join Date
    Jul 2013
    Posts
    233
    Thanks given
    39
    Thanks received
    4
    Rep Power
    18
    Quote Originally Posted by clem585 View Post
    These are dummy variables. You need to change them to whatever the equivalent is in your source (player.getinv.getitem(cashid))...
    i tryed this that obviously isnt correct https://gyazo.com/7a811a14affbf4ca96c6f635f42d3df2
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Jul 2011
    Posts
    1,767
    Thanks given
    493
    Thanks received
    425
    Rep Power
    0
    not to be mean but wtf lmao

    put if (value < 0)
    return; and if (value > player.getinv.getamountof(995)
    error
    return
    Reply With Quote  
     

  5. Thankful user:


  6. #5  
    im 12 idk what this is.

    Join Date
    Jul 2013
    Posts
    233
    Thanks given
    39
    Thanks received
    4
    Rep Power
    18
    Quote Originally Posted by _hassan View Post
    not to be mean but wtf lmao

    put if (value < 0)
    return; and if (value > player.getinv.getamountof(995)
    error
    return
    yes im a noob, sorry if im gravedigging, just cant figure this out plz https://gyazo.com/1a8014468c1edf8d3f2025e990b54a2e
    Reply With Quote  
     

  7. #6  
    Banned

    Join Date
    Jul 2011
    Posts
    1,767
    Thanks given
    493
    Thanks received
    425
    Rep Power
    0
    thts not how it works

    u need to check if the value input is zero or lower or max_integer or high so basically

    if (value <= 0 || value > Integer.MAX_VALUE)
    return; // ends the code

    and then under it

    value = the input that you type in the runscript
    think about this check like; you go to the store, want to buy some candy but don't have enough money

    the cost of candy = value variable
    the player.get... method = your money

    if (value > player.getInventory().getAmountOf(995) {
    u dont have enough money
    return
    }

    and then whatever code u are adding

    ps; u dont need to declare custom variables like "money" etc
    pss; what you are adding is literally basic mathematics, so you should be able to do it - just think
    psss; you rly shouldn't be hosting a server if you don't know how to do a lot of stuff, again, not trying to be mean - just don't waste ur time and rather learn
    Reply With Quote  
     

  8. Thankful user:



Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. Replies: 4
    Last Post: 01-06-2015, 07:28 PM
  2. Replies: 0
    Last Post: 03-14-2012, 06:17 AM
  3. Replies: 11
    Last Post: 08-06-2009, 10:01 PM
  4. Error compiling, anyone help? will rep++
    By xSelseor in forum Help
    Replies: 7
    Last Post: 07-04-2009, 04:41 PM
  5. Parsing errors? Please help will Rep++
    By Gimmeyoshoez™ in forum Help
    Replies: 2
    Last Post: 02-19-2009, 04:58 PM
Tags for this Thread

View Tag Cloud

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