SOLVED: calling a function from within a function

Started by selmiak, Thu 10/03/2011 19:02:23

Previous topic - Next topic

selmiak

is this even possible? I get an 'unknown token $functionname' error when trying to. Do I need to make the function I want to call from within the function global? If yes, how do I do this?

Khris

Not sure what you're trying to do; calling a function from within another function is of course possible, the important thing here is scope i.e. the function you're trying to call must have been declared already or must have been imported in the header if it is in another script.

Could you post the code you're using? Are you using any additional scripts / modules?

Crimson Wizard

#2
In other words, you should make sure that function you are calling is positioned BEFORE the function you call it from.

selmiak

10 PRINT "THANKS, THIS WORKS!"
20 GOTO 10


RUN :D

SMF spam blocked by CleanTalk