Thread: return issue
View Single Post
  #1 (permalink)  
Old 09-20-2007, 11:21 PM
Cableguy's Avatar
Cableguy Cableguy is online now
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,345
Awards Showcase
Forum Contributer 
Total Awards: 1
Default return issue

Hi,guys

I have a sub calling another sub several times in order to give me a random on/off state, like this:

sub setup
....
image1.image=rnd_img(state)&".png"
....
image2.image=rnd_img(state)&".png"
....
End Sub

Sub rnd_img
x=rnd(0,2)
if x= 0 then state="ON" Else state="OFF"
retun(state)
End Sub

The return keyword errors with a "FormatException" so nothing is passed to the calling sub...
Why??
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote