1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.36 Bug Reporting thread
    Solutions and more information may already be available.

Need luasocket core dll

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by duk3luk3, Aug 14, 2014.

  1. duk3luk3

    duk3luk3
    Expand Collapse

    Joined:
    Aug 7, 2014
    Messages:
    7
    I'm trying to play around with the remoteController script. It seems like the socket functions are completely disabled in the current build since there is no core.dll. None of the official DLLs shipped by the luasocket project work so my guess is that the one in use in dev builds is built from source with the main code.

    Could I have the file, pretty please? (My guess is that a developer needs to rebuild the alpha build I'm using with sockets enabled...)
     
  2. tdev

    tdev
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 3, 2012
    Messages:
    3,085
    No .dll required. Just start the game with the following argument: -luasocket
     
  3. duk3luk3

    duk3luk3
    Expand Collapse

    Joined:
    Aug 7, 2014
    Messages:
    7
    Thanks, but that doesn't seem to work. I still get an exception in the log that it cannot load socket.core.

    If it helps, my beamng.drive.exe has file version 0.3.4.0 and version.txt says alpha_prerace239. (Is there a way to get the build version from the console?)

    Here's the exception trace:

    Code:
    BEAMNG| ERR | S0|*** FATAL LUA ERROR: lua/socket/socket.lua:12: module 'socket.core' not found:
    BEAMNG| ERR | ^no field package.preload['socket.core']
    BEAMNG| ERR | ^no file 'lua/system/socket\core.lua'
    BEAMNG| ERR | ^no file 'lua/socket/socket\core.lua'
    BEAMNG| ERR | ^no file 'lua/socket\core.lua'
    BEAMNG| ERR | ^no file 'socket\core.lua'
    BEAMNG| ERR | ^no file '.\socket\core.dll'
    BEAMNG| ERR | ^no file 'D:\Users\Luke\AppData\Local\BeamNG\BeamNG.drive\alpha_prerace\socket\core.dll'
    BEAMNG| ERR | ^no file 'D:\Users\Luke\AppData\Local\BeamNG\BeamNG.drive\alpha_prerace\loadall.dll'
    BEAMNG| ERR | ^no file '.\socket.dll'
    BEAMNG| ERR | ^no file 'D:\Users\Luke\AppData\Local\BeamNG\BeamNG.drive\alpha_prerace\socket.dll'
    BEAMNG| ERR | ^no file 'D:\Users\Luke\AppData\Local\BeamNG\BeamNG.drive\alpha_prerace\loadall.dll'
    BEAMNG| ERR | stack traceback:
    BEAMNG| ERR | ^[C]: in function 'require'
    BEAMNG| ERR | ^lua/socket/socket.lua:12: in main chunk
    BEAMNG| ERR | ^[C]: in function 'require'
    BEAMNG| ERR | ^[string "lua/system/main.lua"]:32: in main chunk
    
    EDIT: I think I figured out why - the arguments are parsed too late. I added an error() call into parseArgs.cs and the log shows this now:

    Code:
    BEAMNG| ERR | S0|*** FATAL LUA ERROR: lua/socket/socket.lua:12: module 'socket.core' not found:
    BEAMNG| ERR | ^no field package.preload['socket.core']
    BEAMNG| ERR | ^no file 'lua/system/socket\core.lua'
    BEAMNG| ERR | ^no file 'lua/socket/socket\core.lua'
    BEAMNG| ERR | ^no file 'lua/socket\core.lua'
    BEAMNG| ERR | ^no file 'socket\core.lua'
    BEAMNG| ERR | ^no file '.\socket\core.dll'
    BEAMNG| ERR | ^no file 'D:\Users\Luke\AppData\Local\BeamNG\BeamNG.drive\alpha_prerace\socket\core.dll'
    BEAMNG| ERR | ^no file 'D:\Users\Luke\AppData\Local\BeamNG\BeamNG.drive\alpha_prerace\loadall.dll'
    BEAMNG| ERR | ^no file '.\socket.dll'
    BEAMNG| ERR | ^no file 'D:\Users\Luke\AppData\Local\BeamNG\BeamNG.drive\alpha_prerace\socket.dll'
    BEAMNG| ERR | ^no file 'D:\Users\Luke\AppData\Local\BeamNG\BeamNG.drive\alpha_prerace\loadall.dll'
    BEAMNG| ERR | stack traceback:
    BEAMNG| ERR | ^[C]: in function 'require'
    BEAMNG| ERR | ^lua/socket/socket.lua:12: in main chunk
    BEAMNG| ERR | ^[C]: in function 'require'
    BEAMNG| ERR | ^[string "lua/system/main.lua"]:32: in main chunk
    DebugDrawer Enabled!
    GFX Init:
       Direct 3D (version 9.x) device found
       Direct 3D (version 9.x) device found
    
    Not an error: Enabling sockets
    "Not an error: Enabling sockets" is what I put into parseArgs.cs.

    EDIT: Whelp, I just went ahead and put the initialisation code into graphicsStep() in main.lua. Ugly as all hell, but hey, it works.... ;-)
     
    #3 duk3luk3, Aug 15, 2014
    Last edited: Aug 15, 2014
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice