Thread: rounding plz?
View Single Post
  #1  
Old 05-23-2007, 01:29 AM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
Question rounding plz?

I have made a shop where you can buy axe's and go chop some trees down.
then you can come back and sell your wood for a random amount of the day(well not exactly)

here is my script:
PHP Code:
function onPlayerEnters(){
this.num random(3,20);
}
function 
onPlayerChats(){
if (
player.chat == "/buy axe"){
if (
player.rupees >= 500){
player.rupees -= 500;
addweapon(Axe);
player.chat "I got an Axe!";
}
if (
player.rupees 500){
player.chat "I need more rupees for that axe!";
}
}
if (
player.chat == "/sell wood"){
clientr.woods -= 5;
player.rupees += this.num;
player.chat "I sold 5 wood for "@this.num@" bucks!";
}

there is nothing wrong with it, i just dont want it to say:
I sold 5 wood for 13.457252421932 bucks!
cause thats just redonculous(re-donk-u-lus )
__________________
**FLIP OUT**
Reply With Quote