[Server Scripting] TheUnknownOne's Server Script

Discussion in 'Server and Client Scripting' started by TheUnknownOne, Aug 24, 2011.

?

Should /info be in a table?

Poll closed Sep 20, 2011.
  1. Yes

    100.0%
  2. No

    0 vote(s)
    0.0%
  1. Dezhovator

    Dezhovator Member

    Joined:
    Jul 21, 2012
    Messages:
    33
    Likes Received:
    0
    I did what you told.
    If you aren't busy, can you please connect my server and look whether it works or not?
    My server name is: Pokemon Türkiye
     
  2. kazzaluis

    kazzaluis Member

    Joined:
    Jun 15, 2012
    Messages:
    93
    Likes Received:
    0
    var Pokedex error when i try to use Pokedex
     
  3. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
    Can you give me an error log?
     
  4. kazzaluis

    kazzaluis Member

    Joined:
    Jun 15, 2012
    Messages:
    93
    Likes Received:
    0
    ok this night i will send you but your script has a multiteam support to ban abilities for dream world ??? in al team slots ???

    i remembered an error in your showteam command but this night i will test
     
  5. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
    Yes.
     
  6. kazzaluis

    kazzaluis Member

    Joined:
    Jun 15, 2012
    Messages:
    93
    Likes Received:
    0
    on server window
    Script Error line 11752: ReferenceError: Can't find variable: id
    and
    Script Warning in sys.getFileContent(filename): error when opening db/pokes/special_moves.txt: No such file or directory
    Runtime Error: Could not call script.loadPokemonStats! TypeError on line 909: Result of expression 'array.splice' [undefined] is not a function.
    Server Script has been loaded.
    Evaluation Time: 1.104 seconds.
    Type !importdata to import data from other scripts. This feature doesn't work with every script yet.


    "/showteam", "/team"
    Code (text):
    1. Script Error line 10290: SyntaxError: too few arguments in call to teamPokeLevel(); candidates are
    2.     teamPokeLevel(int,int,int)
    "/pokedex"
    Code (text):
    1. Script Error line 3732: ReferenceError: Can't find variable: pokedex

    /send command
    (17:37:52) ~Server~: The command send doesn't exist

    /imp command
    (17:39:42) ~Server~: Now you are Poseidon!
    3 ( this appear when i'm tipe after imp command)
    (17:39:43) 3


    i found thats bugs
     
    Last edited: Jul 25, 2012
  7. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
    Ok, thanks. These are fixed (follow the installation guide again). You might need to restart your server to use /pokedex, or:
    /eval delete Poke_Data;
    /reloadscript
     
  8. kazzaluis

    kazzaluis Member

    Joined:
    Jun 15, 2012
    Messages:
    93
    Likes Received:
    0
    Script Error line 10395: ReferenceError: Can't find variable: tiers

    appears this and doesn't change tiers when you have a drizzle+SS and i use /banfrom to ban that Pokemons and abilities and isn't work

    and


    when you try to use /showteam and Pokedex command isn't work
    Script Error line 10250: ReferenceError: Can't find variable: x
     
    Last edited: Jul 25, 2012
  9. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
    These should be fixed (I don't know if pokedex is because you didn't give me a log)
     
  10. kazzaluis

    kazzaluis Member

    Joined:
    Jun 15, 2012
    Messages:
    93
    Likes Received:
    0
    only show this

    Script Error line 3732: ReferenceError: Can't find variable: pokedex

    when i'm try to use Pokedex command
     
  11. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
    Ok, I added a try catch block around it. What appears when you update?
     
  12. Dezhovator

    Dezhovator Member

    Joined:
    Jul 21, 2012
    Messages:
    33
    Likes Received:
    0
    What about my problem?
    I can't still join the tournaments. I tried another script but in this line there is an error.


    Code (text):
    1.             var srctier = sys.tier(src);
    2.             if (tour[channel].tourtier != srctier){
    3.                 sys.sendHtmlMessage(src, "<timestamp/><i>Sorry, you are currently not battling in the " + tour[channel].tourtier + " tier. Change your tier to " + tour[channel].tourtier + " to be able to join.</i>", channel);
    4.                 return;
    5.             }
     
  13. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
    Have you updated yet?
     
  14. Dezhovator

    Dezhovator Member

    Joined:
    Jul 21, 2012
    Messages:
    33
    Likes Received:
    0
    No. Where? :S
     
  15. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
  16. kazzaluis

    kazzaluis Member

    Joined:
    Jun 15, 2012
    Messages:
    93
    Likes Received:
    0
    i will test this night again
     
  17. Dezhovator

    Dezhovator Member

    Joined:
    Jul 21, 2012
    Messages:
    33
    Likes Received:
    0
    Updated but nothing happened. commands aren't working. Only welcome message is working.
     
  18. Arceus

    Arceus Member

    Joined:
    May 20, 2010
    Messages:
    238
    Likes Received:
    0
    Does it say some kind of Script Error Line xxx in the server window when you either update the scripts or try and use a command?
     
  19. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
    Ok, thanks.

    If nothing pops up, try restarting (if you don't want to wait restart anyway).

    I just improved tournaments too (Many message fixes!).
     
  20. kazzaluis

    kazzaluis Member

    Joined:
    Jun 15, 2012
    Messages:
    93
    Likes Received:
    0
    Fatal Script Error line 1278: SyntaxError: Parse error


    don't load commands
     
  21. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
    Oops, fixed it. Update.
     
  22. kazzaluis

    kazzaluis Member

    Joined:
    Jun 15, 2012
    Messages:
    93
    Likes Received:
    0
    Script Error line 9270: ReferenceError: Can't find variable: CommandStats

    don't show commands yet
     
  23. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
    Should be fixed in the update.
     
  24. Dezhovator

    Dezhovator Member

    Joined:
    Jul 21, 2012
    Messages:
    33
    Likes Received:
    0
    I guess the problem is solved. I can join tournaments. Thank you.
    On server screen these errors appears but they don't pose a problem.

    Script Error line 9271: ReferenceError: Can't find variable: CommandStats
    Script Error line 2838: ReferenceError: Can't find variable: servername


    And there is an error or somethingelse on the server.exe!! I have to close it. Why?
    I guess this results from script because I deleted script and didn't close.
     
    Last edited: Jul 26, 2012
  25. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
    Command stats should work now, pokedex should be fixed (not totally sure), and servername should work now (Assuming you have 2.0.05).
     
  26. Dezhovator

    Dezhovator Member

    Joined:
    Jul 21, 2012
    Messages:
    33
    Likes Received:
    0
    I have 2.0.05 but when I tried to connect my server, server.exe crashed.

    edit: Script updated.
     
  27. kazzaluis

    kazzaluis Member

    Joined:
    Jun 15, 2012
    Messages:
    93
    Likes Received:
    0
    i have the same crash problem with the 2.0.05 when i'm logout the server crashes
     
  28. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
    I have the same thing (connecting to server crashes server.exe) but I have the problem with any script.

    This is a PO bug. Uploaded a workaround (not tested, however). Update and see if it doesn't crash.
     
  29. Dezhovator

    Dezhovator Member

    Joined:
    Jul 21, 2012
    Messages:
    33
    Likes Received:
    0
    Updated and the result: it crashes.
     
  30. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
    When does it crash? When you log in or out?
     
  31. Dezhovator

    Dezhovator Member

    Joined:
    Jul 21, 2012
    Messages:
    33
    Likes Received:
    0
    When I log in
     
  32. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
    Does changing to another script help?
     
  33. Dezhovator

    Dezhovator Member

    Joined:
    Jul 21, 2012
    Messages:
    33
    Likes Received:
    0
  34. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
    Everything works fine for me. Whos script did you use? (I'm using 2.0.05d btw)
     
  35. Dezhovator

    Dezhovator Member

    Joined:
    Jul 21, 2012
    Messages:
    33
    Likes Received:
    0
    Lutra's script but I can't join tournament in his script. Can you give the link of your current script? (2.0.05d btw)
     
  36. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
  37. kazzaluis

    kazzaluis Member

    Joined:
    Jun 15, 2012
    Messages:
    93
    Likes Received:
    0
    World</a>]Command</b> -- <font color=#399bcd><b>Poseidon:</b></font> /pokedex Pikachu
    Script Error line 13627: TypeError: Result of expression 'Poke_Data[poke]' [undefined] is not an object.


    World</a>]Command</b> -- <font color=#399bcd><b>Poseidon:</b></font> /showteam Poseidon
    [#Watch] <font color='red'><timestamp/><b>~Server~:</i></b></font> Script Warning in sys.teamPokeShine: No player numbered 0 existing
    Script Error line 10274: ReferenceError: Can't find variable: natureName
     
  38. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
    Ok. /me fixes.

    Done. update the script.
     
    Last edited: Jul 27, 2012
  39. Dezhovator

    Dezhovator Member

    Joined:
    Jul 21, 2012
    Messages:
    33
    Likes Received:
    0
    I didn't understand your last sentence...

    But here the crash I mentioned is...

    Server.exe crash
    Version: 0.0.0.0
    Time stamp: 500357f1
    Faulting module name: QtCore4.dll
    Faulting Module Version: 4.8.1.0
    Faulting Module Time Stamp: 4f61952b
    Exception code: c0000005
    Fault offset: 0005f1c3
     
    Last edited: Jul 27, 2012
  40. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
    c0000005 is access violation (caused by something in the coding).

    What I meant with my last sentence is what happens when you type in /eval sys.tier(src, 0); (when you have scripts in)