Thanks for the info guys, but the select/case gives me the same problem I've been having with the IF statements. Here is the prgram thus far:
dim ltr(26)
set display mode 800, 600, 32
set window title "Hangman Ver. 1.1"
set text font "arial"
set text size 36
ink rgb(0,0,255), rgb(90, 255, 0)
load bitmap "hangman.bmp", 0
set current bitmap 0
load image "spacemansprite1.bmp", 1,1
load image "spacemansprite2.bmp", 2,1
load image "spacemansprite3.bmp", 3,1
load image "spacemansprite4.bmp", 4,1
load image "spacemansprite5.bmp", 5,1
load image "spacemansprite6.bmp", 6,1
load image "spacemansprite7.bmp", 7,1
load image "spacemansprite8.bmp", 8,1
load image "spacemansprite9.bmp", 9,1
PASTE IMAGE 1, 105, 130
begin:
glk=1
remstart
for lp=1 to 26
ltr(lp)=0
NEXT
remend
' select puzzle
pick=rnd(200)
for q=1 to pick
read puzzle$, puznum
next q
check$=""
set cursor 305, 305
if puznum=1 then print "Movie";
if puznum=2 then print "Television";
for q=1 to len(puzzle$)
v$=mid$(puzzle$,q)
v=asc(v$)
if v>64 then check$=check$+"*" else check$=check$+v$
next
set cursor 95, 450
print check$;
rodentclick:
cn=glk
tec=0
mc=mouseclick()
if mc=1 then goto checkpos
goto rodentclick:
checkpos:
posx=mousex()
posy=mousey()
if posx<267 or posx>771 then goto rodentclick
pp=int((posx-267)/39+1)
rem if ltr(pp)=1
rem goto rodentclick
rem ENDIF
' put letter block-out here
rem ltr(pp)=1
if posy=<145 then goto rodentclick
if posy=>221 then goto rodentclick
if posy>181 and posy<185 then goto rodentclick
if posy<182 then goto upper
pp1=pp+77
pp2=pp+109
xy=pp*39+229
xz=xy+36
yy=185
yz=221
box xy,yy,xz,yz, rgb(255,0,0), rgb(255,0,0), rgb(255,0,0), rgb(255,0,0)
goto checkpuz
upper:
pp1=pp+64
pp2=pp+96
aa=pp*39+229
ab=aa+36
ba=146
bb=182
box aa,ba,ab,bb, rgb(255,0,0), rgb(255,0,0), rgb(255,0,0), rgb(255,0,0)
checkpuz:
' check to see if character is in puzzle
for qw=1 to len(puzzle$)
if mid$(puzzle$,qw)=chr$(pp1)
check$=left$(check$, qw-1)+chr$(pp1)+right$(check$, len(check$)-qw)
tec=1
endif
if mid$(puzzle$,qw)=chr$(pp2)
check$=left$(check$, qw-1)+chr$(pp2)+right$(check$, len(check$)-qw)
tec=1
endif
next
box 94, 449, 600, 485, rgb(90,220,255), rgb(90,220,255), rgb(90,220,255), rgb(90,220,255)
set cursor 95, 450
print check$;
if check$=puzzle$ then goto gotit
if tec>0 then goto rodentclick
box 95,490,150,540, rgb(90,220,255), rgb(90,220,255), rgb(90,220,255), rgb(90,220,255)
set cursor 95,490
select cn
case 1:
box 114,346,133,362, rgb(255,0,0), rgb(255,0,0), rgb(255,0,0), rgb(255,0,0)
glk=2
goto rodentclick
endcase
case 2:
box 136,346,155,362, rgb(255,0,0), rgb(255,0,0), rgb(255,0,0), rgb(255,0,0)
glk=3
goto rodentclick
endcase
case 3:
box 158,346,177,362, rgb(255,0,0), rgb(255,0,0), rgb(255,0,0), rgb(255,0,0)
glk=4
goto rodentclick
endcase
case 4:
paste image 2, 105, 130, 1
wait 75
paste image 3, 105, 130, 1
wait 75
paste image 4, 105, 130, 1
wait 75
paste image 5, 105, 130, 1
wait 75
paste image 6, 105, 130, 1
wait 75
paste image 7, 105, 130, 1
wait 75
paste image 8, 105, 130, 1
wait 75
paste image 9, 106, 130, 1
wait 75
goto loss
endcase
endselect
gotit:
set cursor 250, 490
print "You Win!! Another?"
wait key
end
loss:
set cursor 250, 490
print "You Lose!! Another?"
wait key
end
rem hangman Data
rem 1 = movies; 2 = television
rem
rem A
rem
Data "Armageddon", 1, "Arrow", 2, "Avatar", 1, "A Dolphin's Tale", 1, "Apocolypse Now", 1
data "A League Of Extraordinary Gentlemen", 1, "A League Of Their Own", 1, "A Star Is Born", 1, "Air Bud", 1, "A Bridge Too Far", 1
data "Alien", 1, "The Andomeda Strain", 1, "All In The Family", 2, "American Dad", 2, "Air America", 1
data "Arachnidphobia", 1, "Alice Doesnt Live Here Anymore", 1
rem
rem B
rem
Data "The Big Bang Theory", 2, "Black Adder", 2, "Buffy The Vampire Slayer", 1, "Battleship", 1, "Blade", 1
Data "The Book Of Eli", 1, "The Bridesmaids", 1, "The Benny Hill Show", 2, "Bridge Over The River Kwai", 1, "Burn Notice", 2
data "The Brady Bunch", 2, "Blazing Saddles", 1, "Benji", 1, "Batteries Not Included", 1, "Battle Los Angeles", 1
rem
rem C
rem
Data "CSI", 2, "Citizen Kane", 1, "Castaway", 1, "Conan", 2, "Columbo", 2
data "Coma", 1, "Chico And The Man", 2, "Con Air", 1, "Christine", 1, "Clue", 1
rem
rem D
rem
Data "Dracula Dead And Loving It", 1, "The Dirty Dozen", 1, "The Drive", 1, "The Day After Tomorrow", 1, "Dallas", 2
Data "Days Of Our Lives", 2, "Due Date", 1, "The Dating Game", 2, "Dragnet", 1
rem
rem E
rem
Data "Escape From New York", 1, "The Ed Sullivan Show", 2, "Eight Is Enough", 2, "Enemy At The Gates", 1, "Every Which Way You can", 1
data "Every Which Way But Loose", 1
rem
rem F
rem
Data "Friends", 2, "Frankenweenie", 1, "Fawlty Towers", 2, "Father Ted", 2, "Fast Times At Ridgemont High", 1
data "A Fish Named Wanda", 1, "Freaky Friday", 1, "Force Ten From Navarone", 1, "Father Of The Bride", 1, "Family Guy", 2
rem G
rem
Data "Ghost", 1, "Ghostbusters", 1, "General Hospital", 2, "Grey Lady Down", 1, "The Grey", 1
data "Ghosts Of Mars", 1, "Gone With The Wind", 1, "Gremlins", 1, "GI Jane", 1, "The Goonies", 1
rem
rem H
rem
Data "Hancock", 1, "Hitch", 1, "History Of The World: Part One", 1, "How To Train Your Dragon", 1, "Hoodwinked", 1
Data "Hardcastle And McCormick", 2, "House", 2, "Hook", 1, "The Hunt For Red October", 1, "Hill Street Blues", 2
data "Happy Feet", 1, "Home Improvement", 2, "The Hunger Games", 1
rem
rem I
rem
Data "Ice Age", 1, "The Invisible Man", 1, "Invasion Of The Body Snatchers", 1, "I Robot", 1, "I Am Legend", 1
data "Inside Man", 1, "The Incredibles", 1, "The Incredible Journey", 1
rem
rem J
rem
Data "Jabberwocky", 1, "Jeopardy", 2, "The Jerry Springer Show", 2, "Jurrasic Park", 1, "The Jeffersons", 2
data "The Jetsons", 2, "Jumangi", 1, "Journey To The Center Of The Earth", 1
rem
rem K
rem
Data "The Killing Fields", 1
rem
rem L
rem
Data "The Life Of Brian", 1, "Law and Order", 2, "Law Abiding Citizen", 1, "The Lost Boys", 1, "Lilo And Stitch", 1
Data "Late Night With David Letterman", 2, "The Littlest Mermaid", 1, "Logans Run", 1, "LA Law", 2, "Little House On The Prairie", 2
data "Nightline", 2, "Legend", 1, "Leave It To Beaver", 2, "The Last Starfighter", 1, "Lost", 2
rem
rem M
rem
Data "The Meaning Of Life", 1, "Monty Python's Flying Circus", 2, "Monsters Inc", 1, "Miss Congeniality", 1, "Madagascar", 1
Data "Murder She Wrote", 2, "McMillan And Wife", 2, "Magnum PI", 2, "The Muppet Show", 2, "The Muppets Take Manhatten", 1
data "Mutual Of Omahas Wild Kingdom", 2, "March Of The Penguins", 1, "Masterpiece Theater", 2, "The Mummy", 1, "The Mummy Returns", 1
data "Magnum PI", 2, "MASH", 2, "MAD Tv", 2, "Mars Attacks", 1, "Murder By Death", 1
rem
rem N
rem
Data "Nanny McPhee", 1, "Nanny McPhee Returns", 1, "NCIS", 2, "Numbers", 2, "The New Adventures Of Old Christine", 2
rem
rem O
rem
Data "On Golden Pond", 1, "Over The Hedge", 1, "Open Season", 1, "Oprah", 2
rem
rem P
rem
Data "Pretty Little Liars", 2, "Paranorman", 1, "The Proposal", 1, "The Passion Of The Christ", 1, "The Price Is Right", 2
data "Peter Pan", 1, "PS I Love You", 1, "Predator", 1, "The Partridge Family", 2, "The Producers", 1
data "Porkies", 1, "Porkies Revenge", 1
rem
rem Q
rem
rem
rem R
rem
Data "Robin Hood", 1, "Robin Hood, Men In Tights", 1, "Rambo", 1, "Remote Control", 2, "Rosanne", 2
data "Remington Steele", 2, "Ren And Stimpy", 2, "Rowan And Martins Laugh In", 2, "The Rundown", 1, "The Rock", 1
data "Revenge Of The Nerds", 1
rem
rem S
rem
Data "The Sorcerer's Apprentice", 1, "Stolen", 1, "Seinfeld", 2, "Something Wicked This Way Comes", 1, "Starsky And Hutch", 2
Data "The Switch", 1, "The Sting", 1, "Snow White And The Huntsman", 1, "Starship Troopers", 1, "Spaceballs", 1
Data "Silent Movie", 1, "Skyline", 1, "The Secret Of Nihm", 1, "Starman", 1, "St Elsewhere", 2
data "The Shaggy DA", 1, "Scanners", 1, "The Scorpion King", 1, "Sweating Bullets", 2, "The Simpsons", 2
data "Saturday Night Live", 2, "Sniper", 1, "Sparticus", 1, "Sex In The City", 2, "Starsky And Hutch", 2
data "Smokey And The Bandit", 1
rem
rem T
rem
Data "Two And A Half Men", 2, "The Time Machine", 1, "Turner And Hooch", 1, "Taken", 1, "Transformers", 1
data "Tremors", 1, "Thirteen Monkeys", 1, "Tower Heist", 1
rem
rem U
rem
Data "Up The Creek", 1, "Upstairs Downstairs", 2, "Uncommon Valor", 1, "The Usual Suspects", 1
rem
rem V
rem
rem
rem W
rem
Data "When Things Were Rotten", 2, "Wheel Of Fortune", 2, "The Wizard Of Oz", 1, "The Wiz", 1, "Watership Down", 1
data "A Whale For The Killing", 1, "Where Eagles Dare", 1, "The Waltons", 2, "Whose Line Is It Anyway", 2, "Willard", 1
data "War Games", 1
rem
rem X
rem
rem
rem Y
rem
data "Young Frankenstein", 1
rem
rem Z
rem
Data "Zorro, The Gay Blade", 2
Also, when I use the DIM statement, the program crashes on exit:
Problem signature:
Problem Event Name: APPCRASH
Application Name: hangman.exe
Application Version: 1.0.0.0
Application Timestamp: 415d6c05
Fault Module Name: dbprocore.dll
Fault Module Version: 1.0.0.0
Fault Module Timestamp: 4c17df96
Exception Code: c0000005
Exception Offset: 00003e44
OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 1033
Additional Information 1: 34dc
Additional Information 2: 34dcca08ee00438866b0857992f40c04
Additional Information 3: 3ef3
Additional Information 4: 3ef398eac2d7422496ce882bb8c948ad
Any ideas why setting an array would cause the program to crash? When I remove the REM statements from the lines to set/check values, it crashes before running...