Someone help me fix this?

Results 1 to 5 of 5
  1. #1
    Member damankin6 is offline
    MemberRank
    Dec 2008 Join Date
    40Posts

    Someone help me fix this?

    PHP Code:
    //4280002 - Premium Gold Box (Worth 1,000 4001217)
    //4001217 - Heart Mark (Main Trade Exchange)

    function start() {
        if (
    cm.haveItem(4280002) >= 1)
            
    cm.sendSimple("Wow you found a Premium Gold Box #v4280002#!\r\nWould you like to trade it for 1,000 #v4001217# ?\r\n\r\n#L0##gYes!#k #l\r\n#L1##rNO!#k #l");
    }

    function 
    action(modetypeselection) {
    cm.dispose();
        if (
    selection == 0) {
        if (
    cm.haveItem(42800021))
            
    cm.gainItem(4280002, -1);
            
    cm.gainItem(400012171000);
            
    cm.sendOk("Enjoy your 1,000 #v40001217#");
        
    cm.dispose();
        }
        if (
    selection == 1) {
            
    cm.sendOk("Alright, Come back when you wanna trade!");
        
    cm.dispose();
        }

    Can someone Tell my why MoopleDEV's saying "checkSpace error" and crashing maple?

    Well, since its been over 2 hours, while i wait for someone to kindly help me, ill be Toying around with this untill i figure something out..
    Last edited by damankin6; 18-04-12 at 10:46 PM.


  2. #2
    Grand Master TiredGuy is offline
    Grand MasterRank
    Mar 2012 Join Date
    Behind YouLocation
    1,527Posts

    Re: Someone help me fix this?

    PHP Code:
    var status 0;

    function 
    start() {
        
    status = -1;
        
    action(100);
    }

    function 
    action(modetypeselection) {
        if (
    mode == -1) {
            
    cm.dispose();
        }else if (
    mode == 0){
            
    cm.dispose();
            return;        
        } else {
            if (
    mode == 1)
                
    status++;
            else
                
    status--;
            if (
    status == 0) {
       if (
    cm.haveItem(42800021)) {
            
    cm.sendSimple("Wow you found a Premium Gold Box #v4280002#!\r\nWould you like to trade it for 1,000 #v4001217# ?\r\n\r\n#L0##gYes!#k\r\n#L1##rNO!");
        } else {
            
    cm.sendOk("You dont have a Premium Gold Box");
            
    cm.dispose();
            }
        } else if (
    selection == 0) {
            
    cm.gainItem(4280002, -1);
            
    cm.gainItem(400012171000);
            
    cm.sendOk("Enjoy your 1,000 #v40001217#");
            
    cm.dispose();
        }
        if (
    selection == 1) {
            
    cm.sendOk("Alright, Come back when you wanna trade!");
            
    cm.dispose();    
            }
        }


  3. #3
    Grand Master Liv3 is offline
    Grand MasterRank
    Dec 2011 Join Date
    CanadaLocation
    817Posts

    Re: Someone help me fix this?

    PHP Code:
    function start() {
    cm.sendSimple("Wow you found a Premium Gold Box #v4280002#!\r\nWould you like to trade it for 1,000 #v4001217# ?\r\n\r\n#L0##gYes!#k\r\n#L1##rNO!\r\n");
    }

    function 
    action(modetypeselection) {
    if (
    selection == 0) {
    if (
    cm.haveItem(42800021)) {
    cm.gainItem(4280002, -1);
    cm.gainItem(400012171000);
    cm.sendOk("Enjoy your 1,000 #v40001217#");
    } else
    cm.sendOk("Alright, come back when you want to trade!");
    }
    cm.dispose();

    Not tested :D

  4. #4
    Grand Master TiredGuy is offline
    Grand MasterRank
    Mar 2012 Join Date
    Behind YouLocation
    1,527Posts

    Re: Someone help me fix this?

    its suppose to be this i believe o.o
    PHP Code:
    function start() {
    cm.sendSimple("Wow you found a Premium Gold Box #v4280002#!\r\nWould you like to trade it for 1,000 #v4001217# ?\r\n\r\n#L0##gYes!#k\r\n#L1##rNO!\r\n");
    }

    function 
    action(modetypeselection) {
    if (
    selection == 0) {
    if (
    cm.haveItem(42800021)) {
    cm.gainItem(4280002, -1);
    cm.gainItem(400012171000);
    cm.sendOk("Enjoy your 1,000 #v40001217#");
    } else {
    cm.sendOk("Alright, come back when you want to trade!");
    }
    cm.dispose();
    }


  5. #5
    Grand Master Liv3 is offline
    Grand MasterRank
    Dec 2011 Join Date
    CanadaLocation
    817Posts

    Re: Someone help me fix this?

    Quote Originally Posted by TiredGuy View Post
    its suppose to be this i believe o.o
    PHP Code:
    function start() {
    cm.sendSimple("Wow you found a Premium Gold Box #v4280002#!\r\nWould you like to trade it for 1,000 #v4001217# ?\r\n\r\n#L0##gYes!#k\r\n#L1##rNO!\r\n");
    }

    function 
    action(modetypeselection) {
    if (
    selection == 0) {
    if (
    cm.haveItem(42800021)) {
    cm.gainItem(4280002, -1);
    cm.gainItem(400012171000);
    cm.sendOk("Enjoy your 1,000 #v40001217#");
    } else {
    cm.sendOk("Alright, come back when you want to trade!");
    }
    cm.dispose();
    }

    If you do } else with a if else statement, you don't require a bracket after else.



Advertisement