1583 posts
Location
Germany
Posted 27 June 2013 - 09:00 AM
Hello folks,
I'm working on a command line program (Like CraftOS) and have a global function called getProgramDir.
Now I want to use this function in a program of me but always get a "attempt to call string error".
The function only returns a string…
130 posts
Posted 27 June 2013 - 09:15 AM
I can't help without code and error.
1610 posts
Posted 27 June 2013 - 10:17 AM
Without seeing the actual code, it's rather hard to help… Are you sure you're not setting getProgramDir to a string anywhere? Also, are you calling it as getProgramDir or getProgramDir() ?
1 posts
Posted 27 June 2013 - 10:20 AM
try print(getProgramDir) … getProgramDir without ()
1583 posts
Location
Germany
Posted 27 June 2013 - 10:42 AM
Yea, It was a mistake with the name :)/>
thanks for your help!
7508 posts
Location
Australia
Posted 01 July 2013 - 07:15 AM
Yea, It was a mistake with the name :)/>
thanks for your help!
Try and remember…. When you get the "attempt to call" error that means that you're calling a function, that actually isn't a function, it is actually of the type the error contains. So check for any variables of that name where you are overwriting the function.