Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


require("socket") error loading socket.core

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Nthn911
How do I cheat?
Reputation: 0

Joined: 25 Oct 2020
Posts: 2

PostPosted: Sun Oct 25, 2020 2:12 pm    Post subject: require("socket") error loading socket.core Reply with quote

I'm writing a lua server and require sockets. when I require("socket") I get:

Error:error loading module 'socket.core' from file 'C:\Program Files\Cheat Engine 7.1\clibs64\socket\core.dll':
%1 is not a valid Win32 application.


I've checked every relevant post on this topic I could find. I was able to fix it for a much older version of CE, but that version has a bunch of other problems. What do I need to get sockets working with cheat engine 7.1?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25833
Location: The netherlands

PostPosted: Sun Oct 25, 2020 2:15 pm    Post subject: Reply with quote

have you compiled core.dll so it links to lua53-64.dll ?
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Nthn911
How do I cheat?
Reputation: 0

Joined: 25 Oct 2020
Posts: 2

PostPosted: Sun Oct 25, 2020 2:29 pm    Post subject: Reply with quote

Dark Byte wrote:
have you compiled core.dll so it links to lua53-64.dll ?


No, I haven't. Does this require building CE from the source on git? Little new to this area, is there a link I can follow?
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Sun Oct 25, 2020 9:36 pm    Post subject: Reply with quote

You are need check and synchronize both CE and Socket are same bit version.
Of CE is 64 bit then use Socket 64 bit, same if 32 bit.

Check CE Lua path.

Example on my machine:

Code:
print(package.path)


C:\Program Files\Cheat Engine 7.1\lua\?.lua;C:\Program Files\Cheat Engine 7.1\lua\?\init.lua;C:\Program Files\Cheat Engine 7.1\?.lua;C:\Program Files\Cheat Engine 7.1\?\init.lua;C:\Program Files\Cheat Engine 7.1\..\share\lua\5.3\?.lua;C:\Program Files\Cheat Engine 7.1\..\share\lua\5.3\?\init.lua;.\?.lua;.\?\init.lua;?.lua;C:\Users\VCLBro\Documents\My Cheat Tables\?.lua;C:\Program Files\Cheat Engine 7.1\autorun\xml\?.lua;C:\Program Files\Cheat Engine 7.1\autorun\ceshare\?.lua

Code:
print(package.cpath)


C:\Program Files\Cheat Engine 7.1\?.dll;C:\Program Files\Cheat Engine 7.1\..\lib\lua\5.3\?.dll;C:\Program Files\Cheat Engine 7.1\loadall.dll;.\?.dllC:\Program Files\Cheat Engine 7.1\?53.dll;.\?53.dll;C:\Program Files\Cheat Engine 7.1\clibs64\?.dll;.\clibs64\?.dll

From the 'path' result : 'C:\Program Files\Cheat Engine 7.1\' and '...\clibs64\'; I know my CE Lua is 64 bit version

If CE Lua and Socket have different bit version, this won't work; the two architectures cannot be mixed in one process.
Or in short : You need Socket 64 bit version for Lua 5.3

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25833
Location: The netherlands

PostPosted: Mon Oct 26, 2020 1:13 am    Post subject: Reply with quote

no need to recompile CE

you just NEED to compile the luasockets core dll yourself. You may need to use the lua53-64.lib file that comes with CE as a reference if it uses static linking, else you have to edit the modulename if it uses loadlibrary

tip1: Use the ce plugin folder for lua header files
tip2: compile as c++

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25833
Location: The netherlands

PostPosted: Tue Oct 27, 2020 10:26 am    Post subject: Reply with quote

https://cheatengine.org/download/luasocket.zip
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites