1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Forum KScripting together

Discussion in 'Community Dev Corner' started by SnIcKeRs, Apr 7, 2013.

Mods: Downburst, Mazey
  1. master4523

    master4523 Masterful KAG Guard Global Moderator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    378
    For some reasons my current rank on Black Death is:
    "Kills: 60 - Deaths: NaN - Ratio: NaN"
    Any ideas of why my deaths would be equal to NaN ? Any way to fix it?
     
  2. Leo

    Leo Bison Rider

    Messages:
    503
    Got an error with ranks mod and kscript crashed. Error was:


    events.js:72
    throw er; // Unhandled 'error' event
    ^
    Error: EMFILE, open '/home/lrs/kagCTF/kscript/temp/../mods/ranks/stats/MaZuT_RuS'
     
  3. Mazey

    Mazey Haxor Global Moderator Forum Moderator Staff Alumni Donator Official Server Admin

    Messages:
    1,912
    Probably MaZuT_RuS' kills or deaths went higher than 1.7976931348623157e+308, since that is the highest number in javascript.
     
  4. Leo

    Leo Bison Rider

    Messages:
    503
    His k/d ratio is 17 36 (17 kills 36 deaths)
     
  5. Ardivaba

    Ardivaba Bison Rider Tester
    1. The Young Blood Collective - [YB]

    Messages:
    56
    NodeJS Has too many open files.
    You create filestream but you don't close it when saving stuff.

    I would retreat to fs.readFile and fs.writeFile...or even fs.readFileSync and fs.writeFileSync.
     
    master4523 likes this.
  6. SnIcKeRs

    SnIcKeRs Bison Rider

    Messages:
    148
    Ranks mod update v0.26:
    -Rewrote writeFile() function
    -Added REDUCE_LINES option (default = true)
    -If deaths or kills are NaN (:QQ:), they will be reseted
    -Some code fixes
     
    master4523 likes this.
  7. Leo

    Leo Bison Rider

    Messages:
    503
    Please insert some kind of limit to rank reset. Now people just play, they don't like their status, reset and go on. You have no possibility to check someone's rank really. It would be a better idea to be a time limit, something like only 1 reset in 3 days allowed maybe ? Thanks.
     
    master4523 likes this.
  8. SnIcKeRs

    SnIcKeRs Bison Rider

    Messages:
    148
    Ranks mod update v0.27:
    -Added new commands "/rank -h"(help list), "/rank -v"(version info)
    -Added stats reset limit. (default 5 hours, change RESET_INTERVAL option as you wish)
     
    soulrealm and master4523 like this.
  9. Leo

    Leo Bison Rider

    Messages:
    503
    Thanks man, you are great :thumbs_up:
     
  10. Could you perhaps provide a latest for the version I'm using? Only when you have time though! Thank you very much.
     
  11. SnIcKeRs

    SnIcKeRs Bison Rider

    Messages:
    148
    https://dl.dropboxusercontent.com/u/35777135/kag_mods/ranks_svr.zip
    </br>--- merged: May 1, 2013 1:33 AM ---</br>
    Ranks mod update v0.28:
    -Now command "/rank [player]" tolerates name format. It means that "sickers" = "SnIcKeRs" or "sNickErs" = "SnIcKeRs"
     
    soulrealm likes this.
  12. Leo

    Leo Bison Rider

    Messages:
    503
    May I request an addition to ranks mode ? As we all know the current scrore system in kag is bugged so it would be really nice if we can have also ratio in current map only. For example you do /rank and you see: Current map: kills xxx deaths xxx Ratio: xx Full rank: Kills: xxx Deaths : xxx Ratio: xx I hope you understand ;)
     
  13. Mazey

    Mazey Haxor Global Moderator Forum Moderator Staff Alumni Donator Official Server Admin

    Messages:
    1,912
    Quite simple to do that, duplicate everything (file saving etc) but add for the copied ones a reset on event 'matchEnded'
     
    Kovett likes this.
  14. SnIcKeRs

    SnIcKeRs Bison Rider

    Messages:
    148
    Ranks mod update v0.29:
    [add] command "rank -round"
     
    Leo and master4523 like this.
  15. Leo

    Leo Bison Rider

    Messages:
    503
    I love you :)
    </br>--- merged: May 16, 2013 6:43 AM ---</br>
    Hmm... it seems this version crashed but I have no logs yet. I'll let you know the problem.
     
    master4523 likes this.
  16. Unable to download "BadBoyDetector".
    </br>--- merged: May 17, 2013 12:11 PM ---</br>
    Crash:
    PHP:
    Removedbarge74 (13)
    Tried to remove TheHooded_Cornflake but doesn't exist
    undefined
    Removed: MegaOngue (12)
    Added: xgun7 (13)
    Removed: xgun7 (12)
    Added: zollie20 (13)

    /root/ctfscript/temp/ranks.js:161
                resets[n].slice(n, 1); //delete this element
                          ^
    TypeError: Object #<Object> has no method '
    slice'
        at clearResets (/root/ctfscript/temp/ranks.js:161:23)
        at EventEmitter.<anonymous> (/root/ctfscript/temp/ranks.js:73:5)
        at EventEmitter.emit (events.js:115:20)
        at TcprWrapper.parser.parseData (/root/ctfscript/data/kscript_tcpr_wrapper.js:175:23)
        at Socket.TcprWrapper.rcon.startInterval (/root/ctfscript/data/kscript_tcpr_wrapper.js:100:23)
        at Socket.EventEmitter.emit (events.js:88:17)
        at TCP.onread (net.js:392:31)
     
  17. miniu

    miniu Bison Rider

    Messages:
    765
    Bad boy download working for me.
     
  18. I think it's because it's in a group or conversation you are in.

    As it displays this:
     
  19. Leo

    Leo Bison Rider

    Messages:
    503
    Crashed for me too:

    Code:
    /home/lrs/kagUNL/kscript/temp/ranks.js:161
                resets[n].slice(n, 1); //delete this element
                          ^
    TypeError: Object #<Object> has no method 'slice'
        at clearResets (/home/lrs/kagUNL/kscript/temp/ranks.js:161:23)
        at EventEmitter.ks.chat.createCommand.arg_player (/home/lrs/kagUNL/kscript/temp/ranks.js:73:5)
        at EventEmitter.emit (events.js:117:20)
        at parseData (/home/lrs/kagUNL/kscript/data/kscript_tcpr_wrapper.js:175:23)
        at Socket.<anonymous> (/home/lrs/kagUNL/kscript/data/kscript_tcpr_wrapper.js:101:23)
        at Socket.EventEmitter.emit (events.js:95:17)
        at Socket.<anonymous> (_stream_readable.js:710:14)
        at Socket.EventEmitter.emit (events.js:92:17)
        at emitReadable_ (_stream_readable.js:382:10)
        at emitReadable (_stream_readable.js:378:5)
        at readableAddChunk (_stream_readable.js:143:7)
        at Socket.Readable.push (_stream_readable.js:113:10)
        at TCP.onread (net.js:511:21)
     
  20. SnIcKeRs

    SnIcKeRs Bison Rider

    Messages:
    148
    Find this string in script
    "resets[n].slice(n, 1); //delete this element"

    and replace by "resets.splice(n, 1);", then save. It must solve the problem.
    Or redownload the mod.
    </br>--- merged: May 19, 2013 3:55 AM ---</br>
    Ranks mod update v0.30:
    -- "/rank player" can show offline player stats
    -- "-round" argument was reduced to "-r"
    </br>--- merged: May 19, 2013 6:13 AM ---</br>
    Added new mod Maps Randomizer.
    It randomizes maps in mapcycle.cfg every round.

    Before using, make mapcycle.cfg backup and delete all comments (#all words after this symbol).
    Then add full path to MAPCYCLE option.

    How to generate over 999 map configs.
     
    Kovett, master4523 and Digger101 like this.
Mods: Downburst, Mazey