Quote: "I was unaware that my post would not show up right away"
This is explained in the stickies (the threads locked and marked at the top of each board) and when you sign up for the forum you agree that you will read them before posting.
They are worth reading as they contain info that will save you a lot of time in the future.
Daarknes:
Your code snippet compiles and runs without error for me in both DBC and DBP - albeit with different results so your error isn't syntax related.
As far as I am concerned, the tutorial is, let's say... naff. I can see what it's trying to demonstrate, it just doesn't do it because it is written incorrectly (or you have possibly typed it in wrong).
But, it still contains some serious beginner errors.
First of all, please believe me when I say this: "don't have anything to do with any tutorial which uses GOTO - unless it is simply explaining what it does".
Simply ignore the fact that the command exists. It is redundant and should never be needed these days as there are better ways to achieve the same results with procedures and functions. I don't know why tutorials even use Goto because once you get into the habit of using it, it's difficult to get out of it.
Secondly, get into the habit of indenting your code properly. In many cases, this will help you spot hard to find errors in your code - especially later on when your programs get much bigger.
Thirdly, you (and apparently the tutorial you are using) doesn't know the difference between floats and integers.
Tutorial Version Code Working:
Health=100
Start:
CLS
Dec Health,1
If Health > 0
HealthWords$="Your Health is now "+str$(Health)
Print Healthwords$
Wait 1000
GOTO START:
Endif
If Health=0
HealthWords$="Your Health is now "+str$(Health)
Print Healthwords$
Print "You are dead! Press a key to exit..."
Wait Key
End
Endif
I wouldn't have used Goto though...
The Same Snippet Without Goto:
Health=100
Do
Gosub DecHealth
Loop
DecHealth:
Dec Health,1
HealthWords$="Your Health is now "+str$(Health)
CLS
Print Healthwords$
If Health = 0
Print "You are dead! Press a key to exit..."
Wait Key
End
Endif
Wait 1000
Return
Before you go any further, may I suggest that you check out tutorials 1 to 4 here:
Tutorials For Beginners
After doing those, you may be able to spot similar problems with other tutorials yourself.
TDK