Function help

Blitz3D Forums/Blitz3D Beginners Area/Function help

Q(Posted 2005) [#1]
I can't get a function called by pressing a key. Here's a quick example of what i'm talking about:


Graphics 800, 600

While Not KeyHit(1)

	If KeyDown(156)=True Then dothis(a$) ;enter key
	
	Flip
	
Wend
End

Function dothis(a$)

a$ = "asd"

Print a$

End Function


How do you call functions by pressing a key? My code above doesn't work..


octothorpe(Posted 2005) [#2]
	If KeyDown(156)=True Then dothis(a$) ;enter key
should read
	If KeyDown(156)=True Then dothis(a$) ;numpad enter key



Q(Posted 2005) [#3]
OH, my bad! Hehe, thanks man.