@crono12 are you using dbpro of dbc, it can make quite a difference.
The problem I can see is is you are putting the "#" character after every vairable name. The "#" character at the end of the variable name tells db you want the variable to be a floating point number(float). This line causes an error in dbpro
inviup# as integer
it should be
inviup as integer if you want it to be an integer, or either
inviup# = 1 or
inviup as float
if you want it to be a floating point number.
dbpro : 2ghz p4m : 512mb : geforce 4 4200 go