ChangeRating

Discussion in 'Server and Client Scripting' started by Morty., May 11, 2014.

  1. Morty.

    Morty. Learning Scripting

    Joined:
    Jan 12, 2014
    Messages:
    32
    Likes Received:
    0
    PO Trainer Name:
    Morty
    Does Anyone have an Idea of Why this happens?

    Script Warning in sys.changeRating(name, tier, rating): player doesn't exist in tierXY OU

    changeRating(name = 'Morty', tier = 'XY OU', newRating = '1500') at -1

    <anonymous>(src = 2, message = '/changerating Morty:1500', chan = 0) at scripts.js:4679

    <global>() at -1

    if (command == "changerating") {
    var data = commandData.split(':');
    var player = data[0];
    var tier = "XY OU";
    var rating = data[1];
    sys.changeRating(player, tier, rating);
    sendChanMessage(src, "+Bot: El Rating de " + player + " en la tier " + tier + " ahora es de " + rating);
    return;
    }
     
  2. SongSing

    SongSing KILLL

    Joined:
    Jan 2, 2013
    Messages:
    641
    Likes Received:
    191
    PO Trainer Name:
    SongSing
    I'm assuming the player needs to actually be on the ladder. Make sure you have some sort of rating in that tier before trying to change it~
     
  3. Morty.

    Morty. Learning Scripting

    Joined:
    Jan 12, 2014
    Messages:
    32
    Likes Received:
    0
    PO Trainer Name:
    Morty
    Just figured out the person needs to go find battle and finish the battle for it to work xD Thanks :)
     
  4. SongSing

    SongSing KILLL

    Joined:
    Jan 2, 2013
    Messages:
    641
    Likes Received:
    191
    PO Trainer Name:
    SongSing
    Yep, that would be... putting them on the ladder. :)