View Single Post
  #2  
Old 06-02-2009, 08:50 PM
Novice Novice is offline
Developer
Join Date: Dec 2008
Posts: 90
Novice is an unknown quantity at this point
Send a message via MSN to Novice
Quote:
Originally Posted by Duck View Post
post
Please use PHP tags.
Try doing this:

PHP Code:
function onActionGrab()
{
    if (
player.dir != 0)
        return 
false;
    
    if (
this.inuse)
    {
        
player.addMessage("This machine is currently inuse!");
        return 
false;
    }
    
    if (
player.rupees 6)
    {
        
player.addMessage("You need $6 to play!");
        return 
false;
    }
       
    
this.inuse true;
    
player.rupees -= 6;
    
this.safeMoney += 5;
    
    
player.rupees -= 6;
    
this.safeMoney += 6;
    
    
scheduleEvent(random(25), "determineoutcome"player);
    
setcharani("slotmachinespin"NULL);
    

From what I know, there can't be a sub-varname after this.varname (aka this.varname.sub-varname) I may be wrong.
Reply With Quote