For the server file, I made a PHP script that would reply and tell my game the size of the download file in bytes.
Then I'd use:
data, sizeinbytes = love.filesystem.read("file.exe")
then compare the server's amount of bytes and sizeinbytes.
Search found 77 matches
- Sun Jul 15, 2012 7:01 pm
- Forum: Support and Development
- Topic: Downloading a file without blocking.
- Replies: 14
- Views: 3680
- Sun Jul 15, 2012 6:07 pm
- Forum: Support and Development
- Topic: How to Override Lua print() function
- Replies: 3
- Views: 4040
Re: How to Override Lua print() function
It seems when I override print() the game will open and close instantly...
Do I need to return something or similar?
Do I need to return something or similar?
- Sun Jul 15, 2012 6:00 pm
- Forum: Support and Development
- Topic: Math.Random making same output every time...
- Replies: 13
- Views: 4972
Re: Math.Random making same output every time...
It isn't a problem anymore, seeing it worked without calling the extra math.randoms.
Thanks you two!
Thanks you two!
- Sun Jul 15, 2012 5:42 pm
- Forum: Support and Development
- Topic: Math.Random making same output every time...
- Replies: 13
- Views: 4972
Math.Random making same output every time...
Hey peoples!
I am running this code:
Every time I call Game.SessionId it's "11222", even if I load another game window...
Am I doing something obviously wrong here?
I am running this code:
Code: Select all
Game = {Version="0.3.6", SessionId=tostring(math.random(11111, 99999))}
Am I doing something obviously wrong here?
- Sun Jul 15, 2012 5:31 pm
- Forum: Support and Development
- Topic: Opening a Web Browser from LOVE
- Replies: 13
- Views: 10097
Re: Opening a Web Browser from LOVE
I will just escape using ^. Thanks.
- Sun Jul 15, 2012 5:29 pm
- Forum: Support and Development
- Topic: How to Override Lua print() function
- Replies: 3
- Views: 4040
How to Override Lua print() function
Hey guys and gals. How would I go about overriding the print() function? What I'd like to do is make my game send all prints to my server via a thread so that I can look up a users "Session Id" over database which will have all the information for debugging, including errors. However, to d...
- Sun Jul 15, 2012 4:39 pm
- Forum: Support and Development
- Topic: Opening a Web Browser from LOVE
- Replies: 13
- Views: 10097
Re: Opening a Web Browser from LOVE
os.execute("start \"http://www.world2build.com/Forum/NewThr ... .SessionId.."\"")
- Sat Jul 14, 2012 10:37 pm
- Forum: Support and Development
- Topic: Opening a Web Browser from LOVE
- Replies: 13
- Views: 10097
Re: Opening a Web Browser from LOVE
Okay, it opens up a CMD window with that URL as the title now...Robin wrote:Are you surrounding the address by "double quotes"?
is that normal? lol
- Sat Jul 14, 2012 10:18 pm
- Forum: Support and Development
- Topic: Opening a Web Browser from LOVE
- Replies: 13
- Views: 10097
Re: Opening a Web Browser from LOVE
Ahhaha! I am an idiot!Robin wrote:Are you surrounding the address by "double quotes"?
Sorry, and thanks!
- Sat Jul 14, 2012 9:46 pm
- Forum: Support and Development
- Topic: Opening a Web Browser from LOVE
- Replies: 13
- Views: 10097
Re: Opening a Web Browser from LOVE
I was looking around Stack Overflow and found this(it might help you) http://stackoverflow.com/questions/11163748/open-web-browser-using-lua-in-a-vlc-extension (Found kikito with an answer, ironically) http://stackoverflow.com/questions/295052/how-can-i-determine-the-os-of-the-system-from-within-a-...