[Fixed] beforeBattleStarted Bug in 2.6.1

Discussion in 'Solved Bugs' started by Camilo, Jun 12, 2015.

  1. Camilo

    Camilo Member

    Joined:
    Apr 10, 2014
    Messages:
    53
    Likes Received:
    2
    Hello :) recently i made a thread in 'Help' section, but nobody helped me ¬¬, when beforeBattleStarted event is called, weard values are passed to the function.

    Using 2.5.0 the values are:

    Code (text):
    1. (src = 3, tar = 1, clauses = 451, rated = false, mode = 0, id = 1, team1 = 1, team2 = 2)
    But using 2.6.1 the values are:
    Code (text):
    1. (src = 2, tar = 1, clauses = 451, rated = false, mode = 0, id = 1, team1 = 2672464, team2 = 0, 2672960, 0)
    Now, i use a lot the beforeBattleStarted Event and im forced to use 2.6.1 please fix it :c
     
  2. Nightfall Alicorn

    Nightfall Alicorn Left Pokémon Online, most likely not coming back.

    Joined:
    Oct 15, 2013
    Messages:
    491
    Likes Received:
    171
    PO Trainer Name:
    Nightmare Moon
    I think I saw this post but wasn't sure how to help. I know a lot about client scripting, a bit of battle scripting and little server scripting. But I'm guessing this change is related to the newly added Hackmons tier or something.

    I don't know if this will help but. There's a small guide explaining stuff here. https://github.com/po-devs/pokemon-online/wiki/Server-Script-Events

    You could experiment by using one Pokemon and change 1 thing at a time and re-battle to see how it effects the values. Try starting a battle with same Pokemon 2 times. Change a move, try illegal move, change ability, try Hackmon ability, EV values. I once was researching client.player(userId).flags on client script and each user had a different integer between 0 and 7 and discovered this after testing around.
    var flagArray = [];
    flagArray[0] = "Idle Off / Ladder Off / Not In Battle";
    flagArray[1] = "Idle On / Ladder Off / Not In Battle";
    flagArray[2] = "Idle Off / Ladder On / Not In Battle";
    flagArray[3] = "Idle On / Ladder On / Not In Battle";
    flagArray[4] = "Idle Off / Ladder Off / In Battle";
    flagArray[5] = "Idle On / Ladder Off / In Battle";
    flagArray[6] = "Idle Off / Ladder On / In Battle";
    flagArray[7] = "Idle On / Ladder On / In Battle";

    Could be similar to the issue your having.

    Hope this helps. Sorry if I'm not much more help though.
     
  3. Fuzzysqurl

    Fuzzysqurl baa baa mareep I do what I want Server Owner Developer I do what I want Server Owner Developer

    Joined:
    Sep 12, 2012
    Messages:
    2,096
    Likes Received:
    967
  4. Camilo

    Camilo Member

    Joined:
    Apr 10, 2014
    Messages:
    53
    Likes Received:
    2
    Thanks for your help, ah Fuzzysqrl there is no pointers in javascript :c
     
  5. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Solved, for the latest source of the server.

    Sorry about this, truly.