This article is devoted to the problem of the occurrence of grammatical mistakes in texts written by Russian-speaking schoolchildren and foreign children. The purpose of the article is to identify contexts containing syntactically ambiguous constructions in children's written texts, as well as their analysis and comparison. The article explains the concept of syntactic ambiguity and discusses situations and conditions that contribute to its emergence. In addition, some mistakes, which turned out to be closely related to this violation of grammar norms, are subjected to a brief analysis. These errors include: incorrect order of words in a sentence and errors in the construction of sentences with homogeneous parts. Also the task of the article is to determine whether the nature of these mistakes differs in in texts written by native and non-native speakers of Russian of children's age.