Search found 7 matches

by xcrvaz
Thu Dec 01, 2022 11:04 pm
Forum: General
Topic: How to Get file contents
Replies: 4
Views: 1807

Re: How to Get file contents

BrotSagtMist wrote: Thu Dec 01, 2022 11:03 pm Dude i just literally gave you the code in another thread.
Not to read, to check if the file exists.. This is to read
by xcrvaz
Thu Dec 01, 2022 11:01 pm
Forum: General
Topic: How to Get file contents
Replies: 4
Views: 1807

How to Get file contents

Hey, I'm brand new to love2d. How do you get the contents of a file? [[ Context: I'm making a game where you need a password to play. The password gets saved if it's Correct. How do I read the password back to the game so users dont have to re-enter the password. ]] P.S: I Checked the forums, and it...
by xcrvaz
Thu Dec 01, 2022 10:40 pm
Forum: General
Topic: How to check for a file
Replies: 2
Views: 1492

Re: How to check for a file

BrotSagtMist wrote: Thu Dec 01, 2022 10:11 pm

Code: Select all

password=love.filesystem.read("file" )
if password then 
 rungame()
else 
 nopassword()
end
 
Thanks!
by xcrvaz
Thu Dec 01, 2022 9:56 pm
Forum: General
Topic: How to check for a file
Replies: 2
Views: 1492

How to check for a file

Hey there! I'm new to love2d, and I would like to find out how to check if a file exists. I checked the wiki but it was a bit confusing. [Slight information: You need a password to play my game, and I made it so it adds a file that stores the password if its correct, how do I check if this file exis...
by xcrvaz
Wed Nov 30, 2022 2:44 am
Forum: General
Topic: Wait() Function?
Replies: 3
Views: 1984

Re: Wait() Function?

Firstoff .love files are just zips with a fancy name (main.lua in toplevel) Second, luau? That was the roblox thing if i remeber correctly? Yea forget everything you know then, this is not lua, not even the slightest. Sleep puts your program to sleep, it will do absolutely nothing for the time give...
by xcrvaz
Wed Nov 30, 2022 1:47 am
Forum: General
Topic: Wait() Function?
Replies: 3
Views: 1984

Wait() Function?

Hey! I'm brand new to love. I've read a few forums and I know I should give a .love file, but I don't know how to actually get the .love file yet. I'm using an atom text editor plugin to run my code. Is there a wait function? Outside of love.timer.sleep(), because that wasn't working. I'm not new to...
by xcrvaz
Thu Nov 17, 2022 1:29 am
Forum: General
Topic: background image wont show up
Replies: 2
Views: 1279

background image wont show up

I'm brand new to love, and I tried adding a background image to my project, and nothing showed. A little help? local items = { "Gold bar", "Dagger of the forest", "Spirit Lock", "Book of knowledge", "Balloon dog", "Tomato", "Garbage ba...