Hey all,
I am having trouble calling a function through cmd. I can get variables very easy however, when I call a function I always get this error- “Function call failed Timed Out”
I can do spark list and it shows the function there.
Im pretty sure my syntax is perfect, its also successfully verified from ide-
Just a heads up that this code could potentially corrupt memory. It only reserves 8 characters (7 chars plus the null character) for the array pointed to by msg in the line
char msg[] = "DEFAULT";
The function changeMessage copies the contents of newMessage into the array even if changeMessage contains more than 8 characters. This will lead to memory issues.
Refer to this excellent post (another post latter in the thread, by Zachary, gives a great intro to C strings):
@flashyourface I know you've already seen this, but I thought it would improve this thread to reference it.
Thanks @brett13 I actually learned the hard way and got the red light flashing for that exact problem then I updated to have char msg[100] and that kept me a bit safer!