Search the web
Sign In
New User? Sign Up
blassic · Blassic, the Classic Basic.
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Why won't this source code work?   Message List  
Reply | Forward Message #54 of 233 |
This program works fine under QBasic, but not Blassic or GW-Basic.
Any ideas as to why? See below:

1 DATA
99,99,99,99,99,99,9,16,14,19,5,18,1,9,"NORTH","SOUTH","EAST","WEST","U
P","DOWN","HOBBIT","WEREWOLF","DRAGON","VAMPIRE","SWORD","PLATEMAIL","
HELMET","CLOAK"
2
DATA ,2,,,,,1,6,3,,,,4,,,2,,,,3,5,,,,,,,4,,,2,12,7,10,,,,,11,6,8,,,,9,
,,7,,,,8,,,,,6,,,,,13,,7,,,6,15,,,,,11,,14,,,,,,,13,,,12,16,,,,,15,,,1
7,,,18,,16,19,,,,17,,,,,,,17,,,
3 DATA"IN A TAVERN","BY A WELL","IN A CHURCH","AT AN ALTAR","IN
STORAGE","NEAR A VILLAGE","BY A TREE","UP THE TREE","IN A HUT","AT A
MOUNTAIN","IN A MEADOW","IN A FOREST","AT A CLEARING","BY A LAKE","ON
A BRIDGE","BY A CASTLE","IN A HALLWAY","IN A ROOM"
4 DATA"BY A
THRONE","GO","GET","DROP","USE","EXAMINE","LOOK","KILL","INVENTORY","Q
UIT","HELP","ODD CREATURE","HAS FIERY EYES","HAS TOUGH SCALES","A
BLOOD FIEND","BLOOD SWORD","IRON PLATEMAIL","BRASS HELMET","ELVEN
CLOAK"
5 DIM L(25),O$(25),M(25,15),D$(25),DE$(25),VB$(25):FOR X=1 TO 14:READ
L(X):NEXT:FOR X=1 TO 14:READ O$(X):NEXT:FOR X=1 TO 19:FOR Y=1 TO
6:READ M(X,Y):NEXT Y:NEXT X:S$="SLICED":M$="MISSED"
6 FOR X=1 TO 19:READ D$(X):NEXT:FOR X=1 TO 10:READ VB$(X):NEXT:FOR
X=7 TO 14:READ DE$(X):NEXT:CLS:P=125:R=1:?"B-VENTURE":?:?"'CAN YOU
SLAY THE VAMPIRE?'":?
7 ?"YOU ARE ";D$(R):?"< ";:FOR X=1 TO 6:IF M(R,X)>0 THEN? O$(X);" ";
8 NEXT:?">":FOR X=7 TO 14:IF L(X)=R THEN? O$(X);"."
9 NEXT
10
V=0:N=0:Z=0:A$="":XL$="":N$="":V$="":INPUT">",A$:A$=UCASE$(A$):XL$=A$:
FOR X=1 TO LEN(A$):IF MID$(A$,X,1)=" " THEN V$=LEFT$(A$,X-1):Z=X
11 NEXT:N$=MID$(XL$,Z+1):GOSUB 48:FOR X=1 TO 10:V=V+(X AND
V$=VB$(X)):NEXT:FOR X=1 TO 14:N=N+(X AND N$=O$(X)):NEXT
12 ON V GOTO 14,17,19,21,23,7,25,41,46,50
13 GOTO 22
14 IF M(R,N)=0 THEN 22
15 IF R=16 AND N=4 AND L(8)=R THEN?"IT GROWLS,'LEAVE, NOW!'":GOTO 10
16 R=M(R,N):GOTO 7
17 IF N<11 OR L(N)<>R THEN 22
18 L(N)=101:GOTO 21
19 IF N<11 OR L(N)<100 THEN 22
20 L(N)=R
21 ?"OK.":GOTO 10
22 ?"HOW?":GOTO 10
23 IF L(N)<>R AND L(N)<100 THEN 22
24 ? O$(N);":";DE$(N):GOTO 10
25 IF L(N)<>R OR N<7 OR N>10 THEN 22
26 GOSUB 49:T=INT(RND*250)+1
27 GOSUB 49:?">YOU ";:U=2:IF L(11)>99 THEN U=8
28 IF I<5 OR I>6 THEN? M$
29 IF I=5 THEN?"HIT IT":T=T-U*2
30 IF I=6 THEN? S$;" IT":T=T-U*4
31 IF T<1 THEN?"KILLED IT":P=P+99:GOTO 43
32 ?">THEY ";:U=8
33 IF L(12)>99 THEN U=U-3
34 IF L(13)>99 THEN U=U-2
35 IF L(14)>99 THEN U=U-1
36 GOSUB 49:IF I<5 OR I>6 THEN? M$
37 IF I=5 THEN?"HIT YOU":P=P-U*2
38 IF I=6 THEN? S$;" YOU":P=P-U*4
39 IF P<1 THEN?"ENDED YOU":GOTO 46
40 ?"@ HIT A KEY @":GOSUB 47:GOTO 27
41 FOR X=7 TO 14:IF L(X)>100 THEN?" ";O$(X)
42 NEXT:GOTO 10
43 L(N)=99:IF N=10 THEN 45
44 GOTO 10
45 ?"YOU WON!"
46 ?:?"@ GAME OVER @":END
47 A$=INKEY$:IF A$="" THEN 47
48 IF V$="" THEN V$=N$
49 RANDOMIZE TIMER:I=INT(RND*8)+1:RETURN
50 FOR X=1 TO 10:? VB$(X);" ";:NEXT:?:GOTO 10

Sincerely,

Paul
dunric@...




Fri Jul 2, 2004 10:30 am

dunric
Offline Offline
Send Email Send Email

Forward
Message #54 of 233 |
Expand Messages Author Sort by Date

This program works fine under QBasic, but not Blassic or GW-Basic. Any ideas as to why? See below: 1 DATA ...
Paul
dunric
Offline Send Email
Jul 2, 2004
10:30 am

Hello. ... The problem is the empy DATA statement at the end of DATA sentences, that are not correctly handled in the current publics versions of Blassic. I've...
not_found_blassic
not_found_bl...
Offline Send Email
Jul 2, 2004
5:57 pm

Convert strings to all lowercase or all uppercase letters. LCASE$(stringexpression$) UCASE$(stringexpression$) stringexpression$ Any string expression. ...
Neil Morrison
neils_morr
Offline Send Email
Sep 12, 2004
5:42 am

Hello. ... Thanks. These two will be included in the next version of Blassic. Regards....
not_found_blassic
not_found_bl...
Offline Send Email
Sep 12, 2004
1:09 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help