Jump to content

nanakiwurtz

Members
  • Posts

    1654
  • Joined

  • Last visited

  • Days Won

    66

Posts posted by nanakiwurtz

  1. Hello, I have a script to test:

    prontera,145,150,5	script	gettimestr	735,{
    	dispbottom "1a: "+getstrlen(gettimestr("%Y/%m/%d",20));
    	dispbottom "1b: "+gettimestr("%Y/%m/%d",20);
    	
    	dispbottom "2a: "+getstrlen(gettimestr("%Y/%m/%d",10));
    	dispbottom "2b: "+gettimestr("%Y/%m/%d",10);
    	
    	dispbottom "3a: "+getstrlen(gettimestr("%Y/%m/%d",8));
    	dispbottom "3b: "+gettimestr("%Y/%m/%d",8);
    }
    

    It prints:

    1a: 10
    1b: 2015/11/15
     
    2a: 0
    2b:
     
    3a: 0
    3b:

    Line 1a and 1b works just fine, while line 3a and 3b doesn't even print anything.

    What I'm questioning here is the line 2a and 2b, why it doesn't work even line 1a prints 10?

    To make line 2a and 2b work, it needs 1a + 1 = 11

     

    Current syntax: gettimestr(<format string>,<max length>);

    The format string length (%Y, %m,  %d, etc) is always 2 for each.

    So what I'm suggesting here is to remove max length and make it to count automatically by counting the length of <format string> minus 2 for each %x, add by it's corresponding length (%y=2, %Y=4) then +1.

     

    For example: 

    dispbottom ""+gettimestr("%Y/%m/%d");

    %Y = 4, / = 1, % m= 2, / = 1, %d = 2 -> 4 + 1 + 2 + 1 + 2 = 10, but we need to add 1 to make it to work, so it will be 11.

     

    Buuuuttt.. There is a catch..

    The user locale settings is surely different for each systems, like %A (Full weekday name according to locale settings), %B (Full month name according to locale settings), etc

     

    So I don't know if this suggestion even makes sense or not... /hmm

  2. skill.c: In function ‘skill_parse_row_requiredb’:
    skill.c:20304: warning: array subscript is above array bounds
    skill.c:20305: warning: array subscript is above array bounds

    That warning will be fixed soon

     

    [Error]: skill_parse_row_requiredb: Invalid item 1 for skill 2257.
    [Error]: sv_readdb: Could not process contents of line 683 of "db/pre-re/skill_require_db.txt".

    It means the skill NC_PILEBUNKER require item 1549 (Pilebuncker) which is only available on Renewal...

    Are you using pre-re?

×
×
  • Create New...