[Client Scripting] Client Crashes When Using Script

Discussion in 'Server and Client Scripting' started by Silone, Feb 16, 2014.

  1. Silone

    Silone Kanade <3

    Joined:
    Jul 31, 2013
    Messages:
    265
    Likes Received:
    3
    PO Trainer Name:
    Silone
    My PO client crashes when I use this script:

    Code (text):
    1.  
    2.  ({
    3.  beforeSendMessage : function(msg, channel) {
    4. if (msg.substr(0, 8) == "~pmtest ") {
    5.         sys.stopEvent();
    6.         var id = client.id(msg.substr(8));
    7.             client.network().sendPM(id, "This is a script test!");
    8.         }
    9.     }
    10. })
    11.  
    I don't know what I did wrong lol. Any Help?
     
  2. Crystal Moogle

    Crystal Moogle Ayaya~ Administrator Administrator

    Joined:
    Jul 19, 2010
    Messages:
    3,205
    Likes Received:
    531
    PO Trainer Name:
    Hanako
    Make sure you're not trying to send it to yourself.
    It'll crash your client