Problem with my code (end expected)
My code bellow don't work and I don't know why.
The error is "Fin attendue: if à la ligne 16, colonne 2"
In English = "End expected: if at the row 16, column 2"
Thank in advance for your answers.
let t := 0
let c := 0
let a := 0
for stat in (select 'Sous-tâches') do
switch stat.Statut do
case 3: t:=t+1
case 2: c:=c+1
case 1: a:=a+1
default: alert("Erreur")
end
end
if (c=0 and a=0) then
"Terminé"
end
if (t=0 and c=0) then
"A faire"
end
if (c!=0) then
"En cours"
end
2 replies
-
The line 16 is the first "if".
-
Add semi-colons.
let t := 0
let c := 0
let a := 0
for stat in (select 'Sous-tâches') do
switch stat.Statut do
case 3: t:=t+1
case 2: c:=c+1
case 1: a:=a+1
default: alert("Erreur")
end;
end;
if (c=0 and a=0) then
"Terminé"
end;
if (t=0 and c=0) then
"A faire"
end;
if (c!=0) then
"En cours"
end
Content aside
- 4 yrs agoLast active
- 2Replies
- 606Views