Search found 3 matches

by Zaneishere
Thu Jul 22, 2021 4:13 pm
Forum: Support and Development
Topic: why cant i add dt to a variable
Replies: 6
Views: 8669

Re: why cant i add dt to a variable

milon wrote: Thu Jul 22, 2021 1:52 pm
Zaneishere wrote: Wed Jul 21, 2021 4:18 pm update: i tried your solution and it works ty
Huh. My "solution" was just for getting more feedback. It shouldn't have changed anything functionally, but I'm glad it works now! :)
the problem was me printing the variable in the function instead of putting it straight to love.draw
by Zaneishere
Wed Jul 21, 2021 4:18 pm
Forum: Support and Development
Topic: why cant i add dt to a variable
Replies: 6
Views: 8669

Re: why cant i add dt to a variable

Where is p getting called from? Is it getting handed the 'dt' variable correctly? You could trying this to get an idea of why the error is happening: function timer(dt) print(d) -- this will give you console output showing if d is okay print(dt) -- this will give you console output showing if dt is...
by Zaneishere
Sat Jul 17, 2021 4:42 pm
Forum: Support and Development
Topic: why cant i add dt to a variable
Replies: 6
Views: 8669

why cant i add dt to a variable

So, i am trying to make a timer but when i tried to add dt to a variable it only gave me a error that says tried to do arithmetic on local dt d = 0 function timer(dt) d = d + dt love.graphics.print(d) end the function timer(dt) is in the update function also in the draw function function p:update(d...