• variable

    From altere@VERT/DARKDIM to All on Wed Dec 27 06:21:00 2000
    Hrm. Is there easier way to set a variable with the total amount of credits aãuser has rather then reading from xtrn.dat or some other drop file?ããCurrently I have it reading xtrn.dat and taking the credits line and that myã'credits' variable, is there any other way to do this?ãã---ã þ Synchronet þ Dark Dimension ááS ú telnet://dark.dimension-bbs.com ú Hit Me!ã
  • From Digital Man@VERT to altere on Wed Dec 27 04:22:30 2000
    RE: variableãBY: altere to All on Wed Dec 27 2000 02:21 pmãã > Hrm. Is there easier way to set a variable with the total amount of creditsã > user has rather then reading from xtrn.dat or some other drop file?ã > ã > Currently I have it reading xtrn.dat and taking the credits line and that myã > 'credits' variable, is there any other way to do this?ããUse the global variable: _USERON.CDTããIf you want to modify the user's credits, then use the function:ãADJUST_USER_CREDITSããRobã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From altere@VERT/DARKDIM to Digital Man on Wed Dec 27 17:00:00 2000
    RE: variableãBY: Digital Man to altere on Wed Dec 27 2000 12:22 pmãã > Use the global variable: _USERON.CDTã > ã > If you want to modify the user's credits, then use the function:ã > ADJUST_USER_CREDITSããhrm, the adjust_user_credits won't work for what I'm doing as the amount ofãcredits isn't ever the same, it's based on some things the user enters. Havingãsaid that I wanted to have a credits variable and add, mul, or whatever theãuser enters against that variable.ãã---ã þ Synchronet þ Dark Dimension ááS ú telnet://dark.dimension-bbs.com ú Hit Me!ã
  • From altere@VERT/DARKDIM to All on Thu Dec 28 03:16:00 2000
    RE: variableãBY: altere to Digital Man on Thu Dec 28 2000 01:00 amãã > > Use the global variable: _USERON.CDTã > >ã > > If you want to modify the user's credits, then use the function:ã > > ADJUST_USER_CREDITSã > ã > hrm, the adjust_user_credits won't work for what I'm doing as the amount ofã > credits isn't ever the same, it's based on some things the user enters. HavããAlright, perhaps some help with this.. This is just a piece of it and I'veãlimited some things for testing.. Basically it asks for a few numbers from theãuser and add's subtracts, etc... Now, real basic here without adding orãsubtracting.ããint a_credit u_level mod_fileãset a_credit 10ããfopen mod_file O_CREAT|O_WRONLY "%nmoduser.dat"ãif_falseã print "error\r\n"ã returnãend_ifããfwrite mod_file a_creditãfclose mod_fileããNow, this obviously creates the moduser.dat (i've verified) but it's justãputting a blank line in there rather then 10. Now if the credit adjustmentãwere going to be the same everytime then I would use adjust_credits but thatãisn't the case, a_credit will ALWAYS be different, I just set it to 10 forãtesting purposes. Any ideas? Oh, ignore u_level, once I fix a_credit I canãfix u_level; I've commented out the level info so that what I'm showing here isãactualy what I'm working with. ããããã---ã þ Synchronet þ Dark Dimension ááS ú telnet://dark.dimension-bbs.com ú Hit Me!ã
  • From Amcleod@VERT to altere on Thu Dec 28 04:12:08 2000
    RE: variableãBY: altere to All on Thu Dec 28 2000 11:16 amãã > set a_credit 10ã > fwrite mod_file a_creditããIt's been a looong time, but:ãã1) Doesn't FWRITE output the integer in BINARY?ã2) On Little-endian (Intel-type) boxes, don't the low-order bytes come first?ã3) With A_CREDIT set to "10" isn't that 0A 00 00 00 (in hex)?ã4) Isn't that equivilent to a LINEFEED followed by three NULLS?ã5) Didn't you say the file contained only a linefeed?ããI'd check the BAJA documentation looking for a verb called "FPRINT" and see ifãit did something different to "FWRITE" if I were you.ãã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Digital Man@VERT to altere on Thu Dec 28 05:48:57 2000
    RE: variableãBY: altere to Digital Man on Thu Dec 28 2000 01:00 amãã > > Use the global variable: _USERON.CDTã > >ã > > If you want to modify the user's credits, then use the function:ã > > ADJUST_USER_CREDITSã > ã > hrm, the adjust_user_credits won't work for what I'm doing as the amount ofã > credits isn't ever the same, it's based on some things the user enters. Havã > said that I wanted to have a credits variable and add, mul, or whatever theã > user enters against that variable.ããADJUST_USER_CREDITS supports integer variables. Example:ããint iãset i 10ãadjust_user_credits iããYou can modify _USERON.CDT as it is a read-only variable.ããRobã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From PistolGrip@VERT/WASTELND to Digital Man on Thu Dec 28 11:51:00 2000
    RE: variableãBY: Digital Man to altere on Thu Dec 28 2000 01:48 pmãã > You can modify _USERON.CDT as it is a read-only variable.ããShould that be "can not" modify? :-)ããPGãã---ã þ Synchronet þ WasteLand BBS þ telnet://wasteland.darktech.org ã
  • From altere@VERT/DARKDIM to Amcleod on Fri Dec 29 01:16:00 2000
    RE: variableãBY: Amcleod to altere on Thu Dec 28 2000 12:12 pmãã > 1) Doesn't FWRITE output the integer in BINARY?ã > I'd check the BAJA documentation looking for a verb called "FPRINT" and see ã > it did something different to "FWRITE" if I were you.ãã*CLUEBAT* Um, ok.. I should have noticed that. I'm going to go hide in myãcorner now. :)ãã---ã þ Synchronet þ Dark Dimension ááS ú telnet://dark.dimension-bbs.com ú Hit Me!ã
  • From altere@VERT/DARKDIM to Digital Man on Fri Dec 29 01:17:00 2000
    RE: variableãBY: Digital Man to altere on Thu Dec 28 2000 01:48 pmãã > ADJUST_USER_CREDITS supports integer variables. Example:ããI'll have to try this again with this method. Beats opening moduser.dat, butãit didn't work for me the last time I tried it this way; I'll double check someãthings but either way I have a solution now. Thanks!ãã---ã þ Synchronet þ Dark Dimension ááS ú telnet://dark.dimension-bbs.com ú Hit Me!ã
  • From Digital Man@VERT to PistolGrip on Fri Dec 29 18:31:04 2000
    RE: variableãBY: PistolGrip to Digital Man on Thu Dec 28 2000 07:51 pmãã > > You can modify _USERON.CDT as it is a read-only variable.ã > ã > Should that be "can not" modify? :-)ããCorrect. _USERON.CDT CANNOT be modified (it is a read-only variable).ããRobã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã