DEFined function syntax error?
Root / Programming Questions / [.]
tomrowCreated:
I've been trying to make a program that renders clickable buttons to the screen and I've wrote some tests to see if it works.
Here's what I've got:
DEF CaptionButton(Top,Left,Wide) DRAWBTN 0,Left,Top,Wide,"Test String" RETURN 1 ENDthe DRAWBTN command is also a DEFined function that basically just draws a button to the screen, however CaptionButton will incorporate the click sensing capabilities in it too. However, running CaptionButton(32,32,32) reports a syntax error. This seems to be in line with the documentation included with SmileBASIC as far as I can see, so am I missing something?
You can't call a function without getting it's return value.You may have the answer here. Also, I forgot to say DRAWBTN is not the issue, I tested it seperately and it works. EDIT:Thank you for your help! I put DUMMY= in front of it and it works just fine!PRINT CaptionButton(32,32,32) 'or VAR K=CaptionButton(32,32,32)