Forum

> > CS2D > Scripts > CS2D lua "extended mod"
Forums overviewCS2D overview Scripts overviewLog in to reply

English CS2D lua "extended mod"

7 replies
To the start Previous 1 Next To the start

old CS2D lua "extended mod"

MAX-russia
User Off Offline

Quote
I was working on this extension but it's not working.Because there is no special command for the mod,or I'm doing something wrong.

I made a dll file in cs2d\sys\lua_e\sample.dll -application extension file(command and command's settings)
Create a lua file in cs2d\sys\lua_e\sample.lua -lua with command from dll file
Add a text in cs2d\sys\lua\server.lua -
1
2
dofile("sys/lua_e/sample.dll")
dofile("sys/lua_e/sample.lua")

And i made in cs2d every thing to make the lua work,and nothing isn't working.Please help !

link - www.mediafire.com/?oiqg5x9520z29kk
edited 1×, last 16.09.11 06:22:32 pm

old Re: CS2D lua "extended mod"

Yasday
User Off Offline

Quote
"Dofile" won't work with ".dll" files.

1
2
3
4
5
6
function loadbinaries()
	local f, e, d = package.loadlib("module.dll", "init")
	if e then error("loadbinaries(" .. d .. "): " .. e) return os.exit() end
	return f()
end
loadbinaries()

This is what I'm using.

old Re: CS2D lua "extended mod"

Yasday
User Off Offline

Quote
You can't just write a .dll file in Lua.
You can write some code in C and then compile it to a dll, like I did.

old Re: CS2D lua "extended mod"

palomino
User Off Offline

Quote
user Yasday has written
You can't just write a .dll file in Lua.
You can write some code in C and then compile it to a dll, like I did.

Aren't dll files written in C++?
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview