Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
(0.10.5) Trouble with provided socketserver.lua & sockettest.lua
#1
Hello I have recently started messing around creating lua scripts and wanted to do some stuff with sockets and so tried the included scripts but anytime sockettest.lua connects it disconnects instantly.

Running sockettest without modification gives this output with the error on repeat:
Socket Test: Connecting to 127.0.0.1:8888...
Socket Test: Connected
Socket Test: Shutting down
Socket Test: Connecting to 127.0.0.1:8888...
[ERROR] D:/Emulation/mGBA/scripts/sockettest.lua:29: attempt to concatenate a table value (local 'err')

so i tried changing the error displaying in ST_error to this so i could get some info:
for i = 0, #err, 1
do
console:error(string.format("(Line %d) Socket Test Error: %s", i+1, err[i]))
end

Which gave me this output instead:
Socket Test: Connecting to 127.0.0.1:8888...
Socket Test: Connected
Socket Test: Shutting down
Socket Test: Connecting to 127.0.0.1:8888...
Socket Test: Connected
[ERROR] (Line 1) Socket Test Error: nil
Socket Test: Shutting down

For reference the output on socketserver.lua is this:
Socket Server Test: Listening on port 8888
Socket 1 Received: Connected
[ERROR] Socket 1 Error: disconnected
Socket 2 Received: Connected
Socket 2 Received: [ ]
[ERROR] Socket 2 Error: disconnected

I did try running the scripts on the dev build (0.11.0) and didn't have any such issues there, but I had problems with the emulator not responding when going to load a rom or script so idk lmao. Any help with this would be greatly appreciated ty <3
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2026 Melroy van den Berg.