Jump to content




Program Skips Called Function.


  • You cannot reply to this topic
2 replies to this topic

#1 qsysmine

  • Members
  • 5 posts

Posted 23 December 2014 - 07:05 PM

When running this file, it entirely skips the mainMenu function; I placed extra
end
calls at the bottom, for it was protesting a lack thereof which I could not seem to place.
I would like help with [1] the need for extra ends, and [2] the skipping.
The code is run from another file which opens it as a multishell tab, if that's any help.

#2 Exerro

  • Members
  • 801 posts

Posted 23 December 2014 - 08:03 PM

There are 2 problems here:
1) You have 2 too many ends closing the mainMenu() function.
2) You are writing "else if" rather than "elseif" - it's just one word, having it as 2 words is confusing the interpreter and making it think you have an if statement inside an else statement, which is why it was saying there should be more ends.

#3 qsysmine

  • Members
  • 5 posts

Posted 23 December 2014 - 08:10 PM

View Postawsumben13, on 23 December 2014 - 08:03 PM, said:

There are 2 problems here:
1) You have 2 too many ends closing the mainMenu() function.
2) You are writing "else if" rather than "elseif" - it's just one word, having it as 2 words is confusing the interpreter and making it think you have an if statement inside an else statement, which is why it was saying there should be more ends.
Thanks for the help, but it still appears to skip the menu after removing the extra ends and changing all else ifs to elseif.
Edit: I found the error: I was referring to menu[i] instead of menu.menu[i]. I'm sorry if I wasted anyone's time, and I hope you all have a nice day.

Edited by qsysmine, 23 December 2014 - 11:05 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users