28 April 2020, 22:13 | #1 |
Registered User
Join Date: Jan 2020
Location: United Kingdom
Posts: 20
|
Help with Amos code for guess the number game.
I get a syntax error when I run this simple program any help?
Last edited by RetrogamerRhys; 28 April 2020 at 22:21. |
28 April 2020, 22:24 | #2 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,866
|
Show us the code
|
28 April 2020, 22:29 | #3 |
Registered User
Join Date: Jan 2020
Location: United Kingdom
Posts: 20
|
attached is the image.
Last edited by RetrogamerRhys; 28 April 2020 at 23:22. |
28 April 2020, 23:39 | #4 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,866
|
There is no then following the first two if
|
29 April 2020, 14:25 | #5 |
Registered User
Join Date: Nov 2004
Location: Germany
Posts: 629
|
If you use "THEN" then the command which you want to use should be in the same line, for eg:
Code:
if n<0 or n>100 then print "a number between 0 or 100" : goto ret Code:
if n<0 or n>100 print "a number between 0 or 100" goto ret end if Next trouble is in: Code:
IF n=b then print "You guessed correct";CORRECT=1 next trouble is in Code:
if g$="y" then Rematch=0 Else Rematch=1 Code:
if g$="y" RMTCH=1 else RMTCH=0 end if Amos is thinking that you are using REM command. You will have to rename every "rematch" into something else, like RMTCH or so. You will notice that, if you enter a variable name, (like for e.g. CORRECT) amos is converting it automatically to the uppercase. But when you enter Rematch, it stays lowercase. ( test it by entering all uppercase letters: REMATCH, amos will convert it into RemATCH, indicating that amos is recognizing this as a Rem command ...) p.s. if you can, change to Amos Pro, the editing with it is alot easier ! Last edited by Dan; 29 April 2020 at 15:00. |
29 April 2020, 17:45 | #6 |
Registered User
Join Date: Jan 2020
Location: United Kingdom
Posts: 20
|
The working program after the amendments, thanks for the tips.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
develop AMOS code in PC/Mac | slademania | Coders. AMOS | 6 | 29 November 2019 22:36 |
Copy code/text from PC/Notepad to AMOS | Brick Nash | Coders. AMOS | 8 | 17 October 2018 09:05 |
Is there any way of modularize AMOS code? | darkhog | Coders. AMOS | 9 | 04 April 2017 23:54 |
AMOS (Editor) Source Code | SparkyNZ | request.Apps | 4 | 25 March 2017 00:49 |
What is the Backbone Number & Code? | DerekAutista123 | support.WinUAE | 1 | 05 March 2016 22:36 |
|
|