Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expected assignment after LET x, got Token{Type:, Value:,} #2

Open
misterunix opened this issue Sep 11, 2021 · 0 comments
Open

expected assignment after LET x, got Token{Type:, Value:,} #2

misterunix opened this issue Sep 11, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@misterunix
Copy link
Owner

C:\Users\miste\go\src\basicbots>basicbots.exe -m 11 robots/target-v1.bas robots/nexus-b.bas
Error running program:
line 3025 : expected assignment after LET x, got Token{Type:, Value:,}

3010 LET SCANANGLE = 0
3020 LET RANGE = SCAN SCANANGLE, 5
3025 IF RANGE = 0 OR RANGE > 700 THEN GOTO 3030 ELSE GOTO 3050
3030 LET SCANANGLE = SCANANGLE + 10
3035 IF SCANANGLE = 360 THEN RETURN
3050 CANNON SCANANGLE, RANGE
3055 GOTO 3020

Line 3025 will cause an error and I dont know why.

but if rewritten as
3025 IF RANGE < 700 AND RANGE > 40 THEN GOTO 3050

Works as expected.

@misterunix misterunix added the bug Something isn't working label Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant