• Adding credits w/baja

    From Bigjoe@VERT/BLUETHR to All on Thu Jan 27 15:21:00 2005
    Well, I been trying to find out my when I add credits to a users account in a baja script. This is what happens


    I want to add 1000 credits and for some reason it adds 1,024,000 credits to the users account, and not just 1000 like I wanted, any one have any ideas about whats gong on.


    Thanks

    Joe



    ---
    þ Synchronet þ Blue Thunder - bluethunder.dtdns.net or bluethr.synchro.net
  • From Digital Man@VERT to Bigjoe on Thu Jan 27 14:00:00 2005
    Re: Adding credits w/baja
    By: Bigjoe to All on Thu Jan 27 2005 08:21 pm

    Well, I been trying to find out my when I add credits to a users account in baja script. This is what happens


    I want to add 1000 credits and for some reason it adds 1,024,000 credits to users account, and not just 1000 like I wanted, any one have any ideas about whats gong on.

    I think baja.html pretty much spells it out:

    ADJUST_USER_CREDITS <#>
    args: adj
    ------------------------
    This function is used to add or subtract credits from the current user. The 'adj' argument must be either a positive or negative number (in Kilobytes). Example, to subtract 100K in credits from the current user:
    ADJUST_USER_CREDITS -100

    If you want finer adjustment of user creditss (not in Kilobyte increments), you'll need to use another method (JS or moduser.dat or something).

    digital man

    Snapple "Real Fact" #58:
    A sneeze travels out of your nose at 100mph.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Angus Mcleod@VERT/ANJO to Bigjoe on Thu Jan 27 18:55:00 2005
    Re: Adding credits w/baja
    By: Bigjoe to All on Thu Jan 27 2005 20:21:00

    I want to add 1000 credits and for some reason it adds 1,024,000 credits to users account, and not just 1000 like I wanted, any one have any ideas about whats gong on.

    1,024,000 is 1,000K. Lookit:

    ADJUST_USER_CREDITS <#>
    args: adj
    ------------------------
    This function is used to add or subtract credits from the current
    user. The 'adj' argument must be either a positive or negative number
    (in Kilobytes). Example, to subtract 100K in credits from the current
    user:

    ADJUST_USER_CREDITS -100


    Notice the "(in Kilobytes)" which by the way is *wrong* because you don't measure Credits in bytes, Kilo- or otherwise, but in any event the number
    you specify is in KiloCredits. So you can't add 1,000 but you can add
    1,024 by doing

    ADJUST_USER_CREDITS 1


    ---
    þ Synchronet þ Where we BAJA Rob into writing our modules. The ANJO BBS
  • From Bigjoe@VERT/BLUETHR to Digital Man on Thu Jan 27 17:51:00 2005
    Re: Adding credits w/baja
    By: Digital Man to Bigjoe on Thu Jan 27 2005 07:00 pm

    Re: Adding credits w/baja
    By: Bigjoe to All on Thu Jan 27 2005 08:21 pm

    Well, I been trying to find out my when I add credits to a users account baja script. This is what happens


    I want to add 1000 credits and for some reason it adds 1,024,000 credits users account, and not just 1000 like I wanted, any one have any ideas ab whats gong on.

    I think baja.html pretty much spells it out:

    ADJUST_USER_CREDITS <#>
    args: adj
    ------------------------
    This function is used to add or subtract credits from the current user. The 'adj' argument must be either a positive or negative number (in Kilobytes). Example, to subtract 100K in credits from the current user:
    ADJUST_USER_CREDITS -100

    If you want finer adjustment of user creditss (not in Kilobyte increments), you'll need to use another method (JS or moduser.dat or something).

    digital man


    Ok, thats why. I thought 100 credit ment 100 credits, not 100k in credits. Thanks. Thats what I needed

    Joe



    ---
    þ Synchronet þ Blue Thunder - bluethunder.dtdns.net or bluethr.synchro.net
  • From Digital Man@VERT to Angus Mcleod on Thu Jan 27 18:49:00 2005
    Re: Adding credits w/baja
    By: Angus Mcleod to Bigjoe on Thu Jan 27 2005 11:55 pm

    Re: Adding credits w/baja
    By: Bigjoe to All on Thu Jan 27 2005 20:21:00

    I want to add 1000 credits and for some reason it adds 1,024,000 credits users account, and not just 1000 like I wanted, any one have any ideas ab whats gong on.

    1,024,000 is 1,000K. Lookit:

    ADJUST_USER_CREDITS <#>
    args: adj
    ------------------------
    This function is used to add or subtract credits from the current
    user. The 'adj' argument must be either a positive or negative number
    (in Kilobytes). Example, to subtract 100K in credits from the current
    user:

    ADJUST_USER_CREDITS -100


    Notice the "(in Kilobytes)" which by the way is *wrong* because you don't measure Credits in bytes, Kilo- or otherwise, but in any event the number you specify is in KiloCredits.

    :-)

    Initially, credits only applied to file transfers, so 1 credit = 1 byte (basically). Hence the reference to "kilobytes" in the baja docs.

    digital man

    Snapple "Real Fact" #31:
    The average human will eat an average of 8 spiders while sleeping.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net