These are dummy variables. You need to change them to whatever the equivalent is in your source (player.getinv.getitem(cashid))...
|
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
i tryed this that obviously isnt correct https://gyazo.com/7a811a14affbf4ca96c6f635f42d3df2
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
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
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |
Tags for this Thread |