Posted 02 October 2012 - 07:25 AM
writecard = function(fname,uname,pass)
magreader.beginWrite(uname.." "..pass, fname)
print("Hello World")
while true do
event = os.pullEvent()
if event == "mag_write_done" then
break
end
end
end
When ever this function gets used "Hello world" gets printed but the yellow light on the reader/writer doesn't come on and using a card on it doesn't write. It just gets stuck at the loop because a card isn't able to be written.
Yes I have set a mag card reader/writer peripheral to "magreader".
Yes I give valid strings for "uname" "pass" and "fname".
magreader.beginWrite("test", "test")
while true do
event = os.pullEvent()
if event == "mag_write_done" then
break
end
end
This part works when it's alone though.
Sorry for the bad code formatting, I'm not sure how to embed code onto fourm posts.
magreader.beginWrite(uname.." "..pass, fname)
print("Hello World")
while true do
event = os.pullEvent()
if event == "mag_write_done" then
break
end
end
end
When ever this function gets used "Hello world" gets printed but the yellow light on the reader/writer doesn't come on and using a card on it doesn't write. It just gets stuck at the loop because a card isn't able to be written.
Yes I have set a mag card reader/writer peripheral to "magreader".
Yes I give valid strings for "uname" "pass" and "fname".
magreader.beginWrite("test", "test")
while true do
event = os.pullEvent()
if event == "mag_write_done" then
break
end
end
This part works when it's alone though.
Sorry for the bad code formatting, I'm not sure how to embed code onto fourm posts.