Hey I have an error and I don't know what to do

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Dracula06
Prole
Posts: 1
Joined: Wed Apr 22, 2020 11:49 pm

Hey I have an error and I don't know what to do

Post by Dracula06 »

Hey Guys can you help me with that I am a starter and it gives me an error and i dont know what to do

Error main.lua:20: module 'push' not found: no field package.preload['push'] no 'push' in LOVE game directories. no file 'push' in LOVE paths. no file '.\push.lua' no file 'C:\Program Files\LOVE\lua\push.lua' no file 'C:\Program Files\LOVE\lua\push\init.lua' no file '.\push.dll' no file 'C:\Program Files\LOVE\push.dll' no file 'C:\Program Files\LOVE\loadall.dll' Traceback [C]: in function 'require' main.lua:20: in main chunk [C]: in function 'require' [C]: in function 'xpcall' [C]: in function 'xpcall'

WINDOW_HEITH = 720
WINDOW_WIDTH = 1280


function love.load()
love.window.setMode(WINDOW_WIDTH, WINDOW_HEITH,{
fullscreen = false,
resizable = false,
vsync = true
})
WINDOW_HEITH = 720

end

function love.draw()
love.graphics.printf("Hello Pong", 0, WINDOW_HEITH / 2 - 6,
WINDOW_WIDTH, "center")

end

push = require "push"

WINDOW_WIDTH = 1280
VIRTUAL_WIDTH = 432
VIRTUAL_HEITH = 243

function love.load()
push:setupScreen(VIRTUAL_WIDTH, VIRTUAL_HEIGHT, WINDOW_WIDTH, WINDOW_HEITH, {
fullscreen = false,
resizable = false,
vsync = true
})
end

And here is the code that I put
JJSax
Prole
Posts: 47
Joined: Fri Apr 04, 2014 3:59 am

Re: Hey I have an error and I don't know what to do

Post by JJSax »

It sounds like push isn't a file in your project. In the same path as the main.lua file you're running, you should see push.lua that is your push file.
sphyrth
Party member
Posts: 260
Joined: Mon Jul 07, 2014 11:04 am
Contact:

Re: Hey I have an error and I don't know what to do

Post by sphyrth »

Since you're a starter, I'd recommend that you follow Sheepolution instead.

We have seen a number of push:-related questions lately. It's not a native love2d library. I've seen tutorials that use them, and I think they're for the more experienced; if you want Game Development Theories rather than spoon-fed code.
Post Reply

Who is online

Users browsing this forum: Google [Bot], slime and 156 guests