Sara N

@sara_n (2)
Variable not in scope
posted to Ask by sara_n

@a5rocks no, everything is indented I just didnt take care about that on here when i was writing the question. Thanks for the fast reply, though!

Variable not in scope
posted to Ask by sara_n

@MATTHEWBECHTEL thanks for wanting to help :)

Variable not in scope
posted to Ask by sara_n

@MATTHEWBECHTEL I was wondering why it wouldnt work, but I solved the problem.

Variable not in scope
posted to Ask by sara_n

@ThatSmart It started working..?! I didnt change anything about the code I just clicked the run button first and did exactly like in the screenshot I sent. Thats so weird. Thanks for the help.

Variable not in scope
posted to Ask by sara_n

@ThatSmart it returned ''variable not in scope''. But I wrote some easy code now just to see if it would run and after saying ''not in scope'' a few times it did run.

Variable not in scope
posted to Ask by sara_n

@ThatSmart it returns the same thing

Variable not in scope
posted to Ask by sara_n

@ThatSmart i tried the same with length1 and it still didnt work :( .

Variable not in scope
posted to Ask by sara_n

@ThatSmart what should i do then? the function returns an integer and i can add 1 to that integer and get the integer i need

Variable not in scope
posted to Ask by sara_n

@ThatSmart it doesn't matter what i call my function as long as i write my code well

Variable not in scope
posted to Ask by sara_n

@ThatSmart I was told i didnt need a main function, and all of the code I tried works without it. duzina means length so I dont see the problem in adding 1 to it. I wanted to write my own function for determining the length of an array.

Variable not in scope
posted to Ask by sara_n

@ThatSmart Thanks so much for your help! what confused me the most is that similar code used to work a few days ago and also my very experienced teacher said it was fine. I'll try to figure out how to link it.