• System Variables...

    From High Spirit@VERT/DIGITALC to DOVE-Net.Synchronet_Baja on Wed Apr 9 12:53:00 2008
    I'm sure this has been asked before, but I'm at a loss... I'm probably blind ãand the answer is right in front of me.ããHow do I do a math operation (ADD, SUB, DIV, MUL) to a system variable like ã@STATS.LOGONS@?ããFor example, divide STATS.LOGONS (total logons during history of system) by ã7 to get the average calls per day... (just an example, not really the value ãI'm looking for).ãã---ã þ Synchronet þ Digital Creation - digital.servebbs.comã
  • From Angus McLeod@VERT/ANJO to High Spirit on Wed Apr 9 19:24:00 2008
    Re: System Variables...ã By: High Spirit to DOVE-Net.Synchronet_Baja on Wed Apr 09 2008 12:53:00ãã > How do I do a math operation (ADD, SUB, DIV, MUL) to a system variable likeã > @STATS.LOGONS@?ã > ã > For example, divide STATS.LOGONS (total logons during history of system) byã > 7 to get the average calls per day... (just an example, not really the valueã > I'm looking for).ãã@CODES@ as embedded in menus and other text screens aren't variables in ãthe programatic sense. They are substitution codes that are textually ãreplaced in ASCII/ANSI files when those files are sent to the caller. ãYou can't do arithmetic with them.ããIf you are coding in BAJA and want to do arithmetic with a system variable ãyou use the ADD, SUB, MUL and DIV operations. I'd recommend copying the ãvalue to a user variable first and working with that, though. ãã---ãAmarok: 17,459 tracks from 1,238 albums by 1,349 artists, but none playing.ã þ Synchronet þ Where we BAJA Rob into writing our modules. The ANJO BBSã
  • From High Spirit@VERT/DIGITALC to Angus McLeod on Wed Apr 9 20:13:00 2008
    Re: System Variables...ã By: Angus McLeod to High Spirit on Wed Apr 09 2008 07:24 pmãã > @CODES@ as embedded in menus and other text screens aren't variables in ã > the programatic sense. They are substitution codes that are textually ã > replaced in ASCII/ANSI files when those files are sent to the caller. ã > You can't do arithmetic with them.ã > ã > If you are coding in BAJA and want to do arithmetic with a system variable ã > you use the ADD, SUB, MUL and DIV operations. I'd recommend copying the ã > value to a user variable first and working with that, though. ããI had that figured out... but what are the variable names to access those in ãBAJA? I've tried them without the @'s and it gives me the error:ãã!SYNTAX ERROR (expecting variable name):ããã---ã þ Synchronet þ Digital Creation - digital.servebbs.comã
  • From Angus McLeod@VERT/ANJO to High Spirit on Thu Apr 10 08:20:00 2008
    Re: System Variables...ã By: High Spirit to Angus McLeod on Wed Apr 09 2008 20:13:00ãã > > @CODES@ as embedded in menus and other text screens aren't variables inã > > the programatic sense. They are substitution codes that are textuallyã > > replaced in ASCII/ANSI files when those files are sent to the caller.ã > > You can't do arithmetic with them.ãã > I had that figured out... but what are the variable names to access those inã > BAJA? I've tried them without the @'s and it gives me the error:ã > ã > !SYNTAX ERROR (expecting variable name):ããOh, I see. ããWell, not every @CODE@ has an equivilent BAJA variable. Look near the ãbottom of docs/baja.html for a list of system variables.ãã---ãPlaying: "Stand on the rock" by "Fleetwood Mac"ã from the "Behind the mask" album.ã þ Synchronet þ Where we BAJA Rob into writing our modules. The ANJO BBSã
  • From MRoblivious1bmf@VERT to High Spirit on Fri Jun 6 17:42:19 2008
    To: High Spiritã.,: This is something about System Variables...,ã High Spirit said it to DOVE-Net.Synchronet_Baja on Wed Apr 09 2008 12:53 pmã--ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ-ÄÄÄÄ---ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ---ÄÄÄÄÄÄÄÄÄ--ÄÄÄÄÄÄÄÄã > I'm sure this has been asked before, but I'm at a loss... I'm probably blindã > and the answer is right in front of me.ãã > How do I do a math operation (ADD, SUB, DIV, MUL) to a system variable likeã > @STATS.LOGONS@?ãã > For example, divide STATS.LOGONS (total logons during history of system) byã > 7 to get the average calls per day... (just an example, not really the valueã > I'm looking for).ãããlook in sbbsdefs.inc for stuff you can work with in baja.ããfor example, a callers mod i had laying around:ãã!INCLUDE SBBSDEFS.INCã!INCLUDE FILE_IO.INCãINT FILEãint TãSTR SL CPS SEX ULBYTE DL UL DLBYTE DLTIME HANDLE LOCATION MODEM CONNECTION ãCID NODENUM LC_LOGONSããCOPY LC_LOGONS _USERON.LOGONSãCOPY NODENUM _NODE_NUMãCOPY HANDLE _USERON.ALIASãCOPY LOCATION _USERON.LOCATIONãCOPY MODEM _USERON.MODEMãCOPY CONNECTION _CONNECTIONãCOPY SL _USERON.LEVELãCOPY SEX _USERON.SEXãCOPY CPS _CUR_CPSãCOPY ULBYTE _LOGON_ULBãCOPY UL _LOGON_ULSãCOPY DL _LOGON_DLSãCOPY DLBYTE _LOGON_DLBãããFOPEN FILE O_WRONLY|O_CREAT|O_APPEND "%N..\\LCALLS\LCALLMID.ANS"ããTIME TãFTIME_STR STR "%H:%M" TãFPRINTF FILE " \r\n|05 (time) %-6.6s " TãFPRINTF FILE " |13 (node) %-2.2s" NODENUMãFPRINTF FILE " |13 (sl) %-2.2s" SLãFPRINTF FILE " |13 (handle) %-15.15s" HANDLEãFPRINTF FILE " |05 (location) %-25.25s" LOCATIONãFPRINTF FILE " |13 (modem) %-13.13s" MODEMããFCLOSE FILEãã|15 .Ä.Ú Â Â ÂÂ.Ä. ÂÚ¿ã|07-³ ³Ã¿³ ³³ ³³³ ³³ ³À¿-ã|07 `Ä'ÀÙÁÙÁ`\/'Á`Ä'À-ÙÀÙã|08øùú.[|04Edge of oblivion bbs |12eob-bbs.com|08].úùø|15ããã--- Synchronet 3.14a-Win32 NewsLink 1.85ã * eob - Racine, WisconSIN - telnet://eob-bbs.comã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã