Search found 12 matches

by whiteland92
Sat Aug 19, 2017 7:00 pm
Forum: Support and Development
Topic: Green Square stops moving if there are no bullets
Replies: 4
Views: 940

Re: Green Square stops moving if there are no bullets

if you want the green square to always move you need to move one of the 'end' at line 53-57 and place it at line 33 indenting the code will make it easier to find faults like this :monocle: function love.load() player = {} player.x = 0 player.y = love.graphics.getHeight()/2 player.width = 30 player....
by whiteland92
Mon Apr 17, 2017 5:09 pm
Forum: Support and Development
Topic: Detect if capslock is toggled on ?
Replies: 9
Views: 2106

Re: Detect if capslock is toggled on ?

Or you can filter out non alphanumeric when they type.

Code: Select all

function love.textinput(t)
	if t:match("%w") then
           --"It's alphanumeric only"
        end
end
by whiteland92
Sun Feb 12, 2017 1:28 pm
Forum: Support and Development
Topic: Forum Problems
Replies: 46
Views: 6508

Re: Forum Problems

Not sure what is going on but it looks like this now. Image
edited: nvm seems fine again.
by whiteland92
Fri Nov 04, 2016 10:15 pm
Forum: Support and Development
Topic: Lua serial [SOLVED]
Replies: 4
Views: 4097

Re: Lua serial

Fixed. added this line of code os.execute("powershell $port= new-Object System.IO.Ports.SerialPort COM4,9600,None,8,one;$port.open();$port.close();") working serial, windows only local port = "com4"; local baud = 9600 os.execute("powershell $port= new-Object System.IO.Ports.SerialPort "..port..",".....
by whiteland92
Fri Nov 04, 2016 9:14 pm
Forum: Support and Development
Topic: Lua serial [SOLVED]
Replies: 4
Views: 4097

Lua serial [SOLVED]

i got this code to turn some leds on a arduino. local file = "com3"; local serial = assert(io.open(file,"w")) serial:write("0,25,255,60,1000,false") serial:flush() serial.close() The problem i have is that when the arduino first turns on it doesn't receive it, at least the data in led doesn't blink ...
by whiteland92
Sat Aug 13, 2016 9:09 pm
Forum: Support and Development
Topic: Love2D second .lua file problem
Replies: 6
Views: 1917

Re: Love2D second .lua file problem

if you indent your code it would be easier to spot what's wrong with it. you got one end too much. function physics(table) for i,obj in ipairs(table) do if obj.solid then for i,newobj in ipairs(table) do if (obj.y + obj.height + obj.yspeed) > newobj.y and (obj.x > newobj.x or (obj.x + obj.width) < (...
by whiteland92
Sun Jul 24, 2016 4:18 pm
Forum: Support and Development
Topic: [FIXED]Namepicker not returning any names.
Replies: 2
Views: 532

Re: Namepicker not returning any names.

i made a small gif shoving what you did wrong :3
http://i.imgur.com/R2G6Fgg.gif
by whiteland92
Sat Mar 12, 2016 6:36 pm
Forum: Support and Development
Topic: request. IMAGE instead of USERDATA
Replies: 10
Views: 2404

Re: request. IMAGE instead of USERDATA

one problem i found is that if you are using Löve ":type()" on string,number,table.... it crashes the program.

example

Code: Select all

local text = "Hello World!"
local textType = text:type()

-- this will fail and "blue screen"  --> Main.lua 2: attempt to call method 'type' (a nil value)
by whiteland92
Thu Mar 10, 2016 8:14 pm
Forum: Support and Development
Topic: request. IMAGE instead of USERDATA
Replies: 10
Views: 2404

Re: request. IMAGE instead of USERDATA

well that was fast and easier then i though it would be. thank you so much. both of you :awesome: works like a charm :D local http = require"socket.http" local data = love.graphics.newImage( love.filesystem.newFileData( http.request("http://i.imgur.com/YGmjfbG.jpg") , "" , "file" ) ) error(data:type...