Dilwyn Jones via Ql-Users escribió/skribis/wrote/scrit (2025-09-10T17:20:11+0100): > Dracula is a horror text adventure I've ported to the QL.
i was rewriting the superbasic code into another programming language, just for fun, and discovered there's a bug in the original "get" action routine, which survived also in superbasic: the code does not check whether the desired object already carried or present: ```basic 1490 GOSUB 1940 1500 IF OC(N)=0 THEN PRINT"You can't carry that!!":N=0:GOTO 500 1510 INV(N)=1 1520 PRINT"You got the ";N$".":GOTO 1440:REM LOOKS AT POSSESION ``` ```superbasic 2250 GO SUB 2890 2260 IF OC(N) = 0 THEN PRINT #0,"You can't carry that!!" : N = 0 : GO TO 900 2270 INV(N) = 1 2280 PRINT #0,"You got the ";N$;"." : GO TO 2160 : REMark LOOKS AT POSSESION ``` i think these additions fix the superbasic code (untested): ```superbasic 2255 IF INV(N) = 1 THEN PRINT #0,"You already carry that!!" : N = 0 : GOTO 900 2258 IF OL(N) <> R THEN PRINT #0,"That is not here!!" : N = 0 : GOTO 900 ``` -- Marcos Cruz http://programandala.net _______________________________________________ QL-Users Mailing List
