Psbasemap -L not working

I am trying to plot a simple distance scale bar on my map. From the documentation, it would seem like the -L option in psbasemap would do that, but although I am using the correct syntax (at least I can’t find any mistake), I am still getting an error. My command is:

gmt psbasemap -R$REGION -J$PROJ -BWesN -Ba2f1 -LjBL -P -K > $PSOUT

and the error I keep getting, no matter whether I use -Lg, -Ln, -Lj, or -LJ, with their corresponding options, is:

psbasemap: Syntax error:  Scale reference point was not accepted
	   Positioning is specified via one of four coordinate systems:
	     Use -Lg to specify <refpoint> with map coordinates.
	     Use -Lj or -LJ to specify <refpoint> with 2-char justification code (BL, MC, etc).
	     Use -Ln to specify <refpoint> with normalized coordinates in 0-1 range.
	     Use -Lx to specify <refpoint> with plot coordinates.
	   All except -Lx require the -R and -J options to be set.
	   Append 2-char +j<justify> code to associate that anchor point on the map scale with <refpoint>.
	   If +j<justify> is not given then <justify> will default to the same as <refpoint> (with -Lj),
	     or the mirror opposite of <refpoint> (with -LJ), or MC (else).
	   Optionally, append +o<dx>[/<dy>] to offset map scale from <refpoint> in direction implied by <justify> [0/0].
psconvert: System call [gs -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox -dMaxBitmap=2147483647 -dUseFastColor=true 'Research/SISIE/Data/Seismicity/NZ_Seismicity_Map.ps' 2> './psconvert_71746c.bb'] returned error 256.

Can -L not be used with -B or something? I’ve tried not using -B too and that didn’t work.

-E

Don’t post hypothetical cases if you want us to reproduce your results.

I’m assuming then you want me to specify the region and such?

REGION="165/170/-48/-44"
PROJ="M5i"
PSOUT="my_map.ps"

gmt psbasemap -R$REGION -J$PROJ -BWesN -Ba2f1 -LjBL -P -K > $PSOUT

My script works perfectly fine when the -L option is not specified, if that makes any difference. Also, I’m using GMT version 5.4.4.

I think you should add +c and +w. Try -LjBL+c-46+w100.

Don’t know about GMT5.X anymore (too old), in GMT6 like @Esteban82 said, this prints a scale bar.

psbasemap -R165/170/-48/-44 -JM12 -BWesN -Ba2f1 -LjBL+c-48+w100k+f+o0.5 -P -K > lixo.ps

The error messages have changed since 5.whatever. With your -LjBL I get

psbasemap [ERROR]: Option -L: Not enough arguments given, including no width