Reputation: 19
I'm trying to make a dots and boxes game, however when I try to execute this code that evaluates whether a wall has been drawn, I get a 'syntax error before end' error. The code:
setnextwall(Start, 60) ->
true.
setnextwall(60, Steps) ->
setnextwall(0, Steps + 1).
setnextwall(Start, Steps) ->
case array:get(Start, Rooms) of
false ->
buildwall(Start);
true ->
setnextwall(Start + 1, Steps + 1);
end.
Upvotes: 1
Views: 1390
Reputation: 11626
Remove the last ;
; is a separator between cases, since there's no following case, it's an error
Upvotes: 3