syntax error (Release Announcements)

by frank888, Wednesday, January 22, 2014, 21:34 (1190 days ago)
edited by frank888, Wednesday, January 22, 2014, 21:39

Running on 6 core AMD under Ubuntu 12.04

I keep getting (a variety of) syntax errors alerts that I can't explain. Any help would be appreciated.

This example code below that I took from basic256.org results in the output:
Syntax error on line 4 around column 6. It seems that the error msg often points to the opening parenthesis.

Anybody a hint?

Secondly it's a drag that the editor has no line numbers, especially with longer programs.


# c9_gameroller.kbs
# Game Dice Roller
print "die roller"
s = get("sides on the die",6)
n = get("number of die", 2)
total = 0
for x = 1 to n
d = die(s)
print d
total = total + d
next x
print "total "+ total
end
function get(message$, default)
# get a number - if they enter zero
# or enter default to another value
input message$ + " (default " + default + ") ?", n
if n = 0 then n = default
return n
end function
function die(sides)
# roll a die and return 1 to sides
return int(rand*sides)+1
end function


Complete thread:

 RSS Feed of thread

powered by my little forum