Jump to content
IGNORED

AVGN for commodore PET


Frozone212

Recommended Posts

Ok, do you want your listing to be picked apart with hints of what is happening?

 

The FOR loops on lines 2-3 obviously never loop because you have no NEXT statement.

LET T=0:IF T=0 means it will always execute. Also LET is optional on the PET.

 

M1=X+RND(X/10) probably doesn't work the way you expect. RND takes one argument that is negative to initiate a new seed, 0 or 1 for a random number in the sequence. Possibly what you want is M1=X+RND(1)*X/10 if you want a random number between 0 and X/10.

 

Lines 8-9 obviously will set T=1 regardless, at least unless you GOTO directly to line 9 later on.

 

The GET A$ statement on lines 14-15 follow the same structure as you have tried before. GET reads the keyboard for an instant keypress. If it doesn't get a key, it continues with the empty string. Either you mean INPUT A$ on those lines, or you need a line: 14 GET A$:IF A$="" THEN 14 to wait for a keypress.

 

That said, the IF statements on lines 14-15 will only work if you hammer on the N or E keys at the right moment.

 

The INPUT A$ statement on line 16 has no effect. Same about the INPUT A$ on line 19. As an interesting side effect, I noticed that if I leave the INPUT blank, the program exists. I don't know why it does as I never have observed that behavior before. Perhaps it is PET specific?

 

LET E=INT(1) on line 18 makes little sense since 1 would be an integer anyway.

 

On line 21, you're getting a TYPE MISMATCH because you've closed the string and then follows a line of asterisks. Not sure if made a mistake loading the program?

 

Line 28 has two IF statements following eachother. The variable A$ can't have both values at the same time, but since you GOTO the line directly following, it will work the same.

 

Your interactive fiction is mildly amusing, but it sure isn't much of a game. ?

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...