• Text.dat header problem

    From Lobo@1:103/705 to All on Tue Dec 6 15:21:52 2016
    Hello

    I have a problem using a header in xternal/games section.
    Yesterday I made it work and it did show proper but today it won't do.
    To explain, I have a 'XtrnProgLst.hdr' in CTRL dir (9 points length ansi renamed to .hdr) and my text.dat entry looks like this -

    '"@INCLUDE:XtrnProgLst.hdr@" 380 XtrnProgLstHdr
    "\1h\1wNum \1h|\1h\1b Name " 381 XtrnProgLstTitles "\1h-#-#-#-##-#-#-#-#-#-#-#-#-#-#-#-#-#-#- " 382 XtrnProgLstUnderline "\1h\1w%3u | \1h\1r%-25.25s\1h " 383 XtrnProgLstFmt "\r\1h\1bSelect the number or \1w~Q\1h\1ruit: \1h" 384 WhichXtrnProg "\r\n%s is currently running %s on node %d.\r\n" 385 UserRunningXtrn "\r\nTry again later.\r\n\r\n"'

    (don't mind ' at beginning and end I put it here only, just in case :) )

    It worked yesterday, no problems, shows the header--all good.
    Today it simply shows "@INCLUDE:XtrnProgLst.hdr@" and the games list below as usual so you can in fact play them but it does not show header, just the above 'include' text.
    I did not change anything since yesterday, mind.

    I also used the same approach for User Account to add header there (474 in text.dat) and that one works without problems today as it did yesterday (UserDefaults.hdr also being in ctrl dir).

    I'm sure nothing is wrong with actual .hdr file as it did work. I tried removing the 'XtrnProgLst.hdr' from ctrl just to see if 'not found' error is reported as it should but...no error.
    It seems to me that text.dat just does not execute the "INCLUDE" part for some reason (but oddly executes include for userdefaults).
    It could be something obvious I'm doing wrong but..can't see it.
    Any ideas?

    Thanks.


    |09,.-''|12Dali's Cat - "I love it" |07- Andre Breton, 1925 |09''-., |05daliscat.synchro.net

    ---
    * Synchronet * Dali's Cat
    * Origin: Vertrauen - vert.synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Lobo on Tue Dec 6 13:37:58 2016
    Re: Text.dat header problem
    By: Lobo to All on Tue Dec 06 2016 03:21 pm

    Hello

    I have a problem using a header in xternal/games section.
    Yesterday I made it work and it did show proper but today it won't do.
    To explain, I have a 'XtrnProgLst.hdr' in CTRL dir (9 points length ansi renamed to .hdr) and my text.dat entry looks like this -

    '"@INCLUDE:XtrnProgLst.hdr@" 380 XtrnProgLstHdr "\1h\1wNum \1h|\1h\1b Name " 381 XtrnProgLstTitles "\1h-#-#-#-##-#-#-#-#-#-#-#-#-#-#-#-#-#-#- " 382 XtrnProgLstUnderline "\1h\1w%3u | \1h\1r%-25.25s\1h " 383 XtrnProgLstFmt "\r\1h\1bSelect the number or \1w~Q\1h\1ruit: \1h" 384 WhichXtrnProg "\r\n%s is currently running %s on node %d.\r\n" 385 UserRunningXtrn "\r\nTry again later.\r\n\r\n"'

    (don't mind ' at beginning and end I put it here only, just in case :) )

    It worked yesterday, no problems, shows the header--all good.
    Today it simply shows "@INCLUDE:XtrnProgLst.hdr@" and the games list below as usual so you can in fact play them but it does not show header, just the above 'include' text.
    I did not change anything since yesterday, mind.

    Do you know if you're using the hard-coded external program logic (i.e. invoked with the Baja "xtrn_section" function or JS bbs.xtrn_sec() method) or if you're using the exec/xtrn_sec.js external program menu implementation?

    Although they are intended to behave the same, there could be minor differences (like this one).

    The hard-coded/built-in external program list should allow the header to be dynamic using an @-code like you showed above, but I don't think would work using the exec/xtrn_sec.js (it won't expand @-codes automatically). However, if using xtrn_sec.js, you can always *modify* it to display whatever header you like, without *any* text.dat changes at all. Copy exec/xtrn_sec.js to your mods directory and edit to your liking.

    digital man

    Synchronet/BBS Terminology Definition #9:
    CR = Carriage Return (ASCII 13, Ctrl-M)
    Norco, CA WX: 60.1oF, 64.0% humidity, 7 mph SE wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.00-Win32
    * Origin: Vertrauen - vert.synchro.net (1:103/705)
  • From Lobo@1:103/705 to Digital Man on Tue Dec 6 15:59:08 2016
    Re: Text.dat header problem
    By: Digital Man to Lobo on Tue Dec 06 2016 01:37 pm

    Do you know if you're using the hard-coded external program logic (i.e. invoked with the Baja "xtrn_section" function or JS bbs.xtrn_sec() method) or if you're using the exec/xtrn_sec.js external program menu implementation?

    I am using exec/xtrn_sec.js, correct.

    However, if using xtrn_sec.js, you can always *modify* it to display whatever header you like, without *any* text.dat changes at all. Copy exec/xtrn_sec.js to your mods directory and edit to your liking.

    OK, will try that. So I should put back the 'default' 380 line as it was, back
    into the text.dat (just in case?) and move xtrn_sec.js to mods.
    Just one detail, I see reference in xtrn_sec about header under -
    'if(file_exists(system.text_dir + "menu/xtrn" +
    (xtrn_area.sec_list[xsec].number+1) + ".asc"))'

    If that is correct line I'm looking at, I would have to create a file simply
    called 'xtrn.asc' inside 'menu/ ', is that correct?
    Or do I have to write the actual name of asc inside xtrn_sec.js?

    Thanks for your help.


    |09,.-''|12Dali's Cat - "I love it" |07- Andre Breton, 1925 |09''-., |05daliscat.synchro.net

    ---
    * Synchronet * Dali's Cat
    * Origin: Vertrauen - vert.synchro.net (1:103/705)
  • From Lobo@1:103/705 to Digital Man on Tue Dec 6 17:21:42 2016
    Re: Text.dat header problem
    By: Digital Man to Lobo on Tue Dec 06 2016 01:37 pm


    OK, well..before trying anything else, I simply deleted the .hdr and put
    instead a .asc file inside 'ctrl' directory, reloaded synchro, went to games
    section aaand it works. Really odd.
    Just in case, I reloaded synchro again 2 times and it still works.
    Note that I'm still referencing this .asc file in text.dat on 380 line via
    'INCLUDE' command, the only difference is that it is now .asc instead of .hdr
    .hdr but it is the same file, go figure.
    I hope it continues to work then. :)

    Cheers!


    |09,.-''|12Dali's Cat - "I love it" |07- Andre Breton, 1925 |09''-., |05daliscat.synchro.net

    ---
    * Synchronet * Dali's Cat
    * Origin: Vertrauen - vert.synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Lobo on Tue Dec 6 15:57:50 2016
    Re: Text.dat header problem
    By: Lobo to Digital Man on Tue Dec 06 2016 03:59 pm

    Re: Text.dat header problem
    By: Digital Man to Lobo on Tue Dec 06 2016 01:37 pm

    Do you know if you're using the hard-coded external program logic (i.e. invoked with the Baja "xtrn_section" function or JS bbs.xtrn_sec() method) or if you're using the exec/xtrn_sec.js external program menu implementation?

    I am using exec/xtrn_sec.js, correct.

    However, if using xtrn_sec.js, you can always *modify* it to display whatever header you like, without *any* text.dat changes at all. Copy exec/xtrn_sec.js to your mods directory and edit to your liking.

    OK, will try that. So I should put back the 'default' 380 line as it was, back
    into the text.dat (just in case?) and move xtrn_sec.js to mods.
    Just one detail, I see reference in xtrn_sec about header under -
    'if(file_exists(system.text_dir + "menu/xtrn" +
    (xtrn_area.sec_list[xsec].number+1) + ".asc"))'

    If that is correct line I'm looking at, I would have to create a file simply
    called 'xtrn.asc' inside 'menu/ ', is that correct?

    In that case, it's a file that constitutes the entire listing (not just the header). The filenames are xtrn_sec.asc and xtrn#.asc where '#' is the section number.

    Or do I have to write the actual name of asc inside xtrn_sec.js?

    If you're going to use a header, you'll want to write the actual name of the asc file inside your modified xtrn_sec.js.

    digital man

    Synchronet "Real Fact" #3:
    Synchronet version 2 was written in C and 8086 assembly programming languages. Norco, CA WX: 59.3oF, 71.0% humidity, 6 mph ESE wind, 0.00 inches rain/24hrs --- SBBSecho 3.00-Win32
    * Origin: Vertrauen - vert.synchro.net (1:103/705)