Page 1 of 1

Error push.lua:101

Posted: Tue May 05, 2020 12:14 am
by abdullahchalak
so i am having courses, they come with folders that include the packages, main lua files and even fonts and libraries. i tried to run my project , but I get this error:Error

error push.lua:101: attempt to call field 'getPixelScale' (a nil value)


Traceback

push.lua:101: in function 'initValues'
push.lua:48: in function 'setupScreen'
main.lua:49: in function 'load'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
how do I fix this?????

Re: Error push.lua:101

Posted: Tue May 05, 2020 3:36 pm
by zorg
Hi and welcome to the forums!

Harvard CS50? They should really tell people their projects are not using the latest Löve version...

up to version 0.10.x: love.window.getPixelScale
from 11.x: love.window.getDPIScale

Re: Error push.lua:101

Posted: Thu May 07, 2020 12:59 pm
by Ulydev
Hello abdullahchalak,

Zorg is right. The CS50 projects are using an older version of LÖVE.
Either use LÖVE 0.10.x, or download the latest version of push - https://github.com/cs50/mario-demo/issues/2