push=require 'push'
WINDOW_WIDTH=1280
WINDOW_HEIGHT=720
VIRTUAL_WIDTH=432
VIRTUAL_HEIGHT=243
push:setupScreen(WINDOW_HEIGHT,WINDOW_WIDTH,VIRTUAL_HEIGHT,VIRTUAL_WIDTH,{fullscreen=true})
function love.draw()
push:apply('start')
love.graphics.printf('hello pong',0,VIRTUAL_HEIGHT/2-6,VIRTUAL_WIDTH,center)
push:apply('finish')
end
can someone tell me whats the problem in this?it is giving me errors while running it
cannot understand the error in this code
Re: cannot understand the error in this code
Welcome to the forums.
Would be helpful to know the exact error message you got, keep it in mind next time.
What I can see is that you wrote center without "" (="center") to indicate it as string value which is needed for this argument.
Some more notes:
Would be helpful to know the exact error message you got, keep it in mind next time.
What I can see is that you wrote center without "" (="center") to indicate it as string value which is needed for this argument.
Some more notes:
- Make sure to use proper indention and spacing between values, this will help yourself and everyone who want's to help you with your future problems.
- There is a "Support and Development" sub-forum which is more suitable for this kind of topics then the "General" sub-forum.
Re: cannot understand the error in this code
Re: cannot understand the error in this code
Using the latest version of push.lua is the best advice we can give you.
I have to apologize. Everybody actually knows the drill. We're just tired of addressing it over and over again, although it's not your fault for following CS50.
I have to apologize. Everybody actually knows the drill. We're just tired of addressing it over and over again, although it's not your fault for following CS50.
-
- Prole
- Posts: 26
- Joined: Fri May 22, 2020 7:00 pm
Re: cannot understand the error in this code
As someone who is wrapping up CS50's GD50, I'd give a slight twist to that advice... just use LOVE 0.10.2 for those class exercises where you start with code that the instructor wrote. push is the one that everyone posts here about, but there are other subtle things lurking in assorted other libraries the exercises bundle in, and none of the LOVE-based exercises really need anything that's in 11.3.
If you choose to use LOVE2D for your final project, it's worth moving to 11.3 and also grabbing the current versions of knife, push, etc. But it's not, IMO, worth getting the exercises to work right on 11.3 unless you're planning to base something more interesting on those exercises.
Who is online
Users browsing this forum: No registered users and 1 guest