Most voted "syntax-error" questions
In computer science, syntax errors are errors in the string syntax or tokens intended by the programming language that defined them. In languages compiled syntax errors occur strictly when compiling the program, which is prevented until all syntax errors are corrected.
Learn more…107 questions
Sort by count of
-
6
votes1
answer3099
viewsUncaught Syntaxerror: Unexpected token this
When this code is run all together gives this error, but if it is formatted with line breaks it runs normally, how to fix? Error: Uncaught Syntaxerror: Unexpected token this Code in question: var…
-
5
votes1
answer84
viewsPrevent or remedy it?
Lately I’ve been too preoccupied with preventing code errors. Yet I was left with that doubt: It is better to check (prevent) or remedy (Ensure existence)? Let’s say you did : $var = array( 'name'…
-
4
votes2
answers336
viewsWidth Search - error: 'str_no' undeclared (first use in this Function)
I have the following code on C, for a wide search: #include <stdio.h> #include <stdlib.h> #include <conio.h> //Variáveis globais int id = 0; int proximo = 0; //Função de Busca em…
-
4
votes1
answer13034
viewsNameerror: name [name] is not defined
I need to do Python programming to know the CG percentage in a DNA string... maior = 0 dnaMaior = "" while True: dna = input("Digite uma sequencia de DNA: ") if dna == "Z" or dna == "z": break else:…
-
3
votes3
answers34761
viewsError: "You have an error in your SQL syntax"
I am getting the following error when time to perform a query to insert data into a table in the database: You have an error in your SQL syntax; check the manual that Corresponds to your Mysql…
-
3
votes1
answer81
viewsHow to use 'while' on an 'isNaN()'?
I am doing a "quiz" test and to work the user has to type only numbers, if you do not type, an error message will be sent for him to repeat the process. I was able to solve it with the following: if…
-
3
votes2
answers117
viewsI could not resolve the error: The condition has length > 1 and only the first element will be used
I know there are other questions about this mistake, but since I’m a beginner they didn’t help me solve my specific problem. I am working on the following date.frame: structure(list(Dates =…
-
3
votes1
answer42
viewsHow to handle an error within any Python class?
If I do something like: class Foo(object): pass print(Foo().python) **OUTPUT:** AttributeError: 'Foo' object has no attribute 'python' How can I treat this exception within my class, rather than…
-
3
votes1
answer100
viewsAsync functions inside setInterval giving Syntax Error in HTML
Good morning/evening guys, I’m having a really boring problem, I’m creating a website for a school biology project, about cells. On this site I have to make a loop that performs an action, wait X…
-
2
votes0
answers54
viewsTypeerror: not all Arguments converted During string formatting - Python 3.6 - Power Bill
I am a beginner in the area and during the programming studies in Python I was stuck in this exercise, the goal being to appear on the screen of the user how much he should pay per kwh used,…
-
2
votes1
answer452
viewsPHP error - Try_catch
Parse error: syntax error, Unexpected 'catch' (T_CATCH), expecting end of file in C: xampp htdocs validar_cad_usuario face.php on line 65 My Project is here if anyone can help, I thank you! try { //…
-
2
votes0
answers68
viewsScript Error with PHP 7.1
I have a problem in a module that previously worked correctly in version 5.6 of PHP. After upgrading the server’s PHP to 7.1 it stopped working, due to some functions that were previously present in…
-
2
votes1
answer342
viewsMsg 207, Level 16, State 1 and Msg 4413, Level 16, State 1 error
When I try to execute the following query, these two errors appear to me: Msg 207, Level 16, State 1, Procedure V_RECLAMACOES, Line 3 [Batch Start Line 0]Invalid column name 'Reason'. Msg 4413,…
-
2
votes1
answer52
viewsParameter is not Valid - Picturebox in C#
I am making a TIFF file viewer in Visualstudio 2017, in C#language. I can open the TIFF file, if multipage will separate it by pages and I can show each page and browse through them. My problem is…
-
2
votes1
answer100
viewsError when adding foreign key in SQL table
Hello, I am trying to add a foreign key to an already created table and it gives the following error: Error(s), Warning(s): Incorrect syntax near the keyword 'Foreign'. I tried some modifications in…
-
2
votes0
answers19
viewsBase table or view not found: 1146 Table doesn’t exist Laravel 8.0.4
I upgraded my Standard to version 8.0.4 and now my project has the following error when I try to run php Artisan serves. I have 4 database connections, and only one is the main one and is where the…
-
1
votes1
answer30
viewsHow to solve the Invalidcharactererror error
I’m using a requisition ajax, that returns me a json, from a page .php, named after a city of Mato grosso do sul calling for: Antônio João. The error is javascript. Which says the following:…
-
1
votes1
answer1465
viewsWhy does this error appear when I include a php file
I have the error problem  every time I try to include a file. I am working on an application. When trying to include another php file simply create a space on the page where the characters…
-
1
votes2
answers149
viewsJquery does not run because of syntax
I analyzed my syntax and at first you’re right: $(document).ready(function(){ $('input[placeholder], textarea[placeholder]').focus(function(){ if($(this).val()==$(this).attr('placeholder'))…
-
1
votes1
answer164
viewsError in project Missing ) after argument list
Good afternoon, I am having a problem in my project and have not been able to find out what is causing the problem. Any help is appreciated. function logOnConsole(newLog) { currDate = new Date();…
-
1
votes2
answers19135
viewsSyntax = Invalid Syntax for variable name
LadodoQuadrado = input("Digite o valor correspondente ao lado de um quadrado: " variavel = float(LadodoQuadrado) x = LadodoQuadrado * 4 y = LadodoQuadrado ^ 2 print("perímetro:", x, "área:", y) When…
-
1
votes1
answer99
viewsProgram with problem to compile
I created this program to calculate the BMI, but it doesn’t run completely. He asks to enter with weight and height, but returns no result. Could someone tell me what’s wrong? PROGRAM Calc IMPLICIT…
-
1
votes1
answer344
viewsWhenever I use this error Syntaxerror: Unexpected token
car-master.component.ts import {Component} from '@angular/core'; import {Car} from './car'; import {CarDetailComponent} from './car-detail.Component'; @Component({ selector: 'my-car', templateUrl:…
-
1
votes0
answers34
viewsAngular mudulo is not defined
I’m new to programming, but I’m studying. I’m encountering the following problem at the angle: WARNING: Tried to load angular more than Once, Referenceerror: ponto is not defined.…
-
1
votes1
answer13558
viewsProject error: Uncaught Syntaxerror: Unexpected token var
I am making a console with javascript but I have had problems to discover the origin of the error. I have reviewed the code several times and could not find out what is wrong. Any help is…
-
1
votes1
answer39
viewsSyntax error: Variable problem inside the IF
My code: DELIMITER // CREATE FUNCTION f_desc (in_preco int) RETURNS INT BEGIN DECLARE fim_preco INT; IF in_preco >= 100 THEN -- aqui fim_preco := format(10 * in_preco/100, 2); ELSEIF in_preco…
-
1
votes3
answers162
viewsSyntax error in Mysql
I was creating a table in Mysql and this error appeared in this code: USE cadastro; CREATE TABLE países( cod_país INT NOT NULL AUTO_INCREMENT, nome_país VARCHAR (30), PRIMARY KEY cod_país ); 1…
-
1
votes0
answers72
viewsGiving error Import at /post/new/ No module named 'blog.Forms'
In this line: C: Users Fer Gomes djangogirls mysite blog views.py in , line 5 the code from django.shortcuts import render from django.utils import timezone from .models import Post from…
-
1
votes1
answer675
viewsMulti-line comments and Python identation error
I was writing my code and I needed to block some lines of code. As there are several, I decided to use the 3 quotes to block a part of the code. However, when I run the code it presents an…
-
1
votes1
answer134
viewsError in Opencart purchase button
By clicking the buy button it does nothing, by the console appears the following error Error: Syntax error, unrecognized Expression: #product input[type='text'], #product input[type='Hidden'],…
php html web-application syntax-error opencartasked 6 years, 7 months ago Prime Proj Construções 11 -
1
votes0
answers65
viewsSyntaxerror: JSON.parse: Unexpected Character at line 1 column 1 of the JSON data - Nodejs vueJS
I am using an application with vuejs and Node, and I need to get information through a . json, but when making the request I get the following error: Syntaxerror: JSON.parse: Unexpected Character at…
-
1
votes1
answer1025
viewsHow to Load a listview with more than 30 columns?
I’m trying to carry a ListView with more than thirty columns using the following code: With ListV_P Sheets("BANCO").Select Dim UltimaLinha As Variant Dim Linha As String '.GetFirstVisible = True…
-
1
votes0
answers53
viewsError calling screen by boot
Error in the button, simply close the application in the emulator when press to open another Activity, already everyone came to try to solve and nothing, follow the Logcat and the classes ( the…
-
1
votes1
answer40
viewsError system.net.webexception: 0 using the Ibmwiotp library
I’m working with the library Ibmwiotp to make a POST equipment on the IBM Watson Iot Platform. I have the following code: public void AddDevice(){ try{ ApiClient client = new…
-
1
votes1
answer34
viewsIntegration between Mysql banks giving error 1442?
Hello! I have the following problem to solve: bank 1 cannot interact directly with bank 3, so I need an interface that interacts between them, which I called bank 2. Seat 1 inserts into seat 2; seat…
-
1
votes1
answer51
viewsResolve syntax error by pressing enter on keyboard without typing anything
Good night, you guys. My first post, I’m inciante and it may seem like a silly question but it’s keeping me up at night. I appreciate the help. In the code below, when pressing enter without typing…
-
0
votes1
answer13698
viewsError Code: 1064 - Mysql
Hello, everybody! When building a simple inclusion process gave this following message! Error Code: 1064. You have an error in your SQL syntax; check the manual that Corresponds to your Mysql server…
-
0
votes1
answer162
viewsSyntax error in Procedure Mysql
I have the following Stored Procedure. When executing it in is returned the error of sinxtaxe 1064 as in the image below. What am I missing ?…
-
0
votes1
answer1174
views"Syntaxerror: invalid syntax" error
I was trying to run a very simple program through the terminal (use gnome Ubuntu): #encoding: utf-8 y = int(input("Ultimo número: ")) x=0 while x <= y if x % 2 == 0 print (x) x=x+1 and I came…
-
0
votes1
answer110
views"Escape" file string externally loaded
Problem: I am trying to pass to the database a String containing the bytes of an image that was externally loaded to place in a BLOB field. As always, the bytes of the image have single quotes ',…
-
0
votes0
answers60
viewsParse error: syntax error, Unexpected '<' online 1098 >
Guys, I have a Function.php that ends like this: // Clear Helper/s /* **************************************************************************************************** */ function n_clear() {…
-
0
votes1
answer137
viewsSyntax error in Mysql database
I am trying to create a Procedure in Mysql and is returning Syntax error. Follow my code for analysis: DELIMITER $$ CREATE PROCEDURE CalculaIdadeCP (IN cpcaminhaoid INT) BEGIN DECLARE…
-
0
votes0
answers319
viewsProblems with Scroll View, how to solve?
Good morning, I’m new with Android programming and I’m trying to develop an application in which, depending on the subject that the user choose will open a certain screen, but every time the…
-
0
votes1
answer20
viewsMedia Query syntax error when compressing code
I am trying to compress the site where I work to the maximum and I am minimizing the Java and css, but this giving error to minify the css well in the codes similar to what I will put here below. He…
-
0
votes1
answer1625
viewsHow to remove this warning Notice: Undefined index:
I have a variable $posicoes that receives the amount of elements that exist in the reply session: $posicoes = count($_SESSION['respostas']); So I check if the GET idQuestao is greater than the…
-
0
votes2
answers494
viewsmove_uploaded_file does not work properly
I’ve tried every way move_uploaded_file() move the desired file. I set up a simple image upload form, but it doesn’t move at all. POST: $foto = $_FILES["txtFoto"]; // Caminho de onde ficará a imagem…
-
0
votes3
answers563
viewsProblem keeping quotation marks
famous_person = "Dalai Lama disse:\n" message = "\Se quer viver uma vida feliz, amarre-se a uma meta, não a pessoas nem a coisas\" print(famous_person + message) I have tried everything (including…
-
0
votes2
answers38
viewsError SQL syntax when exporting CREATE TABLE (Myphpadmin)
I’m new here and haven’t started my studies in SQL and PHP, but I would like to ask for help. When trying to download a theme content from my site in WP, error msg appears: Cannot export CREATE…
-
0
votes0
answers19
viewsError when trying to use conditional structure equality in java
The code below is giving error in line if (sexo = 1){, can anyone explain to me why? int sexo = 0, sexoF = 0, sexoM = 0, bom = 0, ruim = 0; while (sexo != -1){ System.out.println("Digite o sexo: ");…
-
0
votes1
answer98
viewsProject execution error in React Native on Windows
I’d like to know why and how to fix that mistake.…