#Scripting being weird?

2 messages · Page 1 of 1 (latest)

slate minnow
#

I'm trying to write a code for gravity, but when I put in var velocity, it says that velocity has been redefined and is erroring. However, at the moment that is the only script, and there is only one mention of velocity; the error line. Can anyone help?

autumn cloud
#

velocity as a value should be an innate part of CharacterBody2D already. look at the documentation for that class for details
so you can't do "var velocity" as it was already defined before. pick a different name for the variable or just assign whatever you needed to the exisiting one.