How do I send a string between 2 PSPs? Here is a test script:
Script A
Adhoc.init()
Adhoc.connect()
data1 = "Trey777"
data2 = "This is a test!!..."
Outdata = "Name"..data1.."text"..data2
function senddata()
Adhoc.send(Outdata)
end
While true do
screen.waitVblankStart()
screen:flip()
end
Script B
red = Color.new(255,0,0)
Adhoc.init()
Adhoc.connect()
function recevmsg()
data = Adhoc.recv()
----What do I here to split the text?
----print name to line '0,10'
----print text to line'0,20'
end
While true do
screen.waitVblankStart()
screen:flip()
end
Each script will be loaded onto a different PSP. One will send and one will receive. I need to know how does it split a string? string.find
and sub
return numbers, not text