-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oneliners.bas not saving one liners on linux #1621
Comments
Thanks for the report - The oneliners.bas script uses "wwiv.data.save" to save the data, it'll be in a JSON file under the data/ directory. Allowing the script to write and then push to a message base is an intersting idea, I think there's an issue here already for the message api to be opened up (I started on it once, but kept hitting some issues making it harder than I expected). As for why oneliners isn't saving, I'll have to check it out could be a permissions issue, look in data/ and subdirs for for new JSON files. Mine is a file called this: With the following content:
|
I see the same thing on debian running 5.9.0.3697 the file on mine is oneliners.script.json. maybe an uppercase issue has crept in when saving. It's reading it fine. |
These are the only .json files within my /wwiv/data directory -rwxrwxrwx 1 ghost ghost 2605 Jun 1 21:01 autoval.json |
Error code I can see via local only, maybe this will help?
|
which version of wwiv? |
I wonder if you are running into paladin-t/my_basic#59 |
My apologies for the delayed reply, I'm running wwiv 5.9.0 development. No .json file is saving at all using the included oneliners.bas example script. |
This is the .bas code. I don't see any reference to it saving to .json rather to a GLOBAL data file: wwiv.data.save("GLOBAL", l) ' ' ' Returns the WWIV Pipe Color Code for def EnterOneLiner() color = getkey() wwiv.io.outstr("|10Anonymous? ") def Main() If Not yn() Then Main() |
That line to GLOBAL should be it. Hmm, data/ONELINERS.script.json is the file and it seems to work for me. |
Just double checked and it looks to work right on both linux and windows |
here's my /bbs/wwiv/data/oneliners.script.json wwiv@beaglebbs:~/data$ ls -l oneliners.script.json |
strange, I was able to copy your file over mine and it still worked. (I have your oneliners file live on my bbs right now) |
I think I may have some ideas, I had an old script, it fails with that error on the new one, but he error makes no sense |
You think there's a difference in the .bas script and how it works (ie, an older version has something a newer one doesn't)? Have there been any changes to oneliners? I didn't think there have been any for quite a while. |
Just found it. There's an "End If" vs. "EndIf" in the script that's causing this error. I'll send a fix. In themean time replace "End If" with "EndIf" and it'll work. The error reporting from my_basic isn't great on this one, so it's showing up on the final line of the script and also doesn't go to the log file. I can't fix the first, but I can make sure it'll log to the logfile in addition to local console (which isn't super useful unfortunately) |
worked for me |
Using Linux Mint / Ubuntu. The provided oneliners.bas does not save one liners when added to the logon event within WWIV.INI. It is set up as @oneliners.bas within WWIV.ini and have scripts turned on in wwivconfig, while also have tried package file on, and package OS on (or set to YES). **Update also tested on Raspberry Pi Bookshelf / Buster / Debian and does not work their either. Could be outdated .bas, however I see it working on other 5.9 windows versions so thought I'd put it here.
Would like the ability to use basic text files for read/write using basic scripting if not already available for things such as creating one liner mods with obvious restrictions from displaying real name and passwords. If this exists, it would be helpful to see an example of a how to read/write to a text or even data file within Linux using WWIV basic scripting for reference and for other mod ideas.
Tied to this, someone requested the ability to save to a text file for purpose of having the script post to an FTN sub such as FSX_BOT or FSX_DAT, and I'd like to add the ability to post to a WWIVnet native base also, such as an experimental sub one can subscribe to. This would allow for interBBS one liners and or last callers for those of us whom may or may not have FTN's on our WWIV BBSes. Being able to code write lines to a text file, with user data such as alias, last call, gold earned, etc. can then be pushed to another BBS or used with a webhook to discord.
Being "new again" to WWIV, I'd like to see an example as to how one can create logon/logoff events to include multiple scripts, command line instructions for .sh or .bat files, multiple .bas scripts, extra ansi files being displayed, extra text written (clear screens and pauses,) all occurring within one logon process file. I would assume it's a .bas file however new to them.
The text was updated successfully, but these errors were encountered: