Subj : Re: JS Commission?
To : Android8675
From : Mortifis
Date : Wed Jul 15 2020 12:36 am
> > My example would've resulted in something like:
> > /sbbs/data/0001-dfrotz/
> Hey eC,
> So I have:
> > const story = backslash(format('stories/%s', argv[0]));
> > const save_dir = backslash(format('%sif/%s%d', system.data_dir, story,
> > user.number));
> > //debug
> > console.print(story);
> > console.crlf(2);
> > console.print(save_dir);
> and it spits out:
> > stories/zork1.z3/
> > /sbbs/data/if/stories/zork1.z3/1/
> the save path is fine, and I verified it works, but how do I drop the
> trailing slash for the story file? Was thinking:
> > const story = format('stories/%s', argv[0]);
const story = format('stories/%s', argv[0].slice(0,1)); might work
---
� Synchronet � Realm of Dispair BBS -
http://ephram.synchro.net:82