Can't start the simple script

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
SammyWest
Prole
Posts: 1
Joined: Sun Jun 16, 2019 3:38 am

Can't start the simple script

Post by SammyWest » Sun Jun 16, 2019 3:42 am

I've tried the command line, and inserting the basic hello world into the start up file. Would the block be due to it being in a folder that has required admin privelages? the error is boot.lua:481:

Do i need some sort of shebang line? do i need to include a specific library? I mean the sample on the website is far from intuitive.

User avatar
bobbymcbobface
Citizen
Posts: 78
Joined: Tue Jun 04, 2019 8:31 pm

Re: Can't start the simple script

Post by bobbymcbobface » Sun Dec 15, 2019 10:28 pm

The best way I can think of solving this is giving you the steps so here you are:

1. Find a location that can be accessed by anyone (so no admin restrictions)
2. Create a folder with a file in it called "main.lua"
3. Type in:

Code: Select all

function love.load()
    print("hi")
end
4. Run the command the close the window and then you should have hi printed in your console

Also if you want a window to open up and print in live time look into conf files on the wiki

Hope this helps :)
I make games that run on potatoes :P

User avatar
zorg
Party member
Posts: 3006
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Can't start the simple script

Post by zorg » Sun Dec 15, 2019 10:36 pm

What do you mean by block?
Why didn't you actually include the error text and just the line number where it occurred?
What sample on the website?

Too little info to actually help you, since tons could be going wrong, or alternatively, you might be doing something wrong as well.

For one, you'll always need at least a main.lua file in a folder;
if you don't have a conf.lua explicitly allowing a console window, you'll only get console output if you run lovec.exe instead of love.exe (even if you started it from an already existing cmd window, assuming windows)
if trying to do this from an IDE, it might indeed buffer console output, so you would need to put io:setvbuf('no') at the top of main.lua
if you're talking about the very first example on the homepage, then that uses love.graphics.print, which will print to the graphical window, not to the console.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

User avatar
pgimeno
Party member
Posts: 2340
Joined: Sun Oct 18, 2015 2:58 pm

Re: Can't start the simple script

Post by pgimeno » Mon Dec 16, 2019 12:34 pm

My suspicion is that LÖVE is being started passing the full path of the Lua file, instead of the folder where main.lua is as it should.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 51 guests