You posted the question in the MUSHclient -> Lua section, so I assumed you were wanting to get some combination of MUSHclient and Lua working.
Although I used Scite a while back, I don't know enough to get Lua going in it. The Scite mailing list or FAQ may be more appropriate here.
I have been using Crimson Editor to run stand-alone Lua code where required. That was fairly easy to set up.
The link I gave before showed I had troubles getting the socket stuff to work, even in MUSHclient, if you don't get the directory structure right. Plus some DLLs have dependencies on others (the Windows Dependency Walker program can help with that) which means they don't load, although not through any direct fault of their own.
Is this a MUSHclient question or a SciTE question? Even if it's a SciTE question, why are you needing to execute code from within the text editor? (Are you using it as an IDE or something?)
What do you mean exactly by "using" the Lua file? What are you doing to run it?
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
Thanks a ton. It may be working fine in MuSHclient Lua. But, I'm using SciTE editor. Can you please suggest me the steps for SciTE (Lua for windows). It would be helpful for me.
Some "Lua for Windows" files use DLL names that do not agree with the ones MUSHclient uses. MUSHclient uses lua5.1.dll however some of the Lua binaries are linked to lua51.dll - this causes them to not load if you don't have lua51.dll there, or if you do they are running connected to a different DLL than the MUSHclient's Lua one.
If you follow the suggestions in the post above it should work.
I tried it with using Lua socket files but still. i am getting the sane eror message.
lua: ad.lua:3: attempt to index global 'luacom' (a nil value)
stack traceback:
ad.lua:3: in main chunk
[C]: ?
I have installed Lua For windows(SciTE) editor from http://code.google.com/p/luaforwindows/ and installed these two files additionally in this path C:\Program Files\Lua\5.1 ( Root directory of Lua)
1. luasocket-2.0-beta2.zip
2. luasocket-2.0-beta2
While installing Luafor windows Luacom is the Inbuilt property of it. But still am getting the nil value error.
Thanks for your reply. I tried it but i am getting the below error message
no field package.preload['http'] and its automatically goes to http.lua file
function Private.receive_status(sock)
local line, err
line, err = %Private.try_receive(sock)
if not err then return %Private.get_statuscode(line), line
else return nil, nil, err end
end
and throwing error message like
lua: error loading module 'http' from file 'C:\Program Files\Lua\5.1\http.lua':
C:\Program Files\Lua\5.1\http.lua:87: unexpected symbol near '%'
while implementing http in lua code I am facing the problem.
for example : I tried the below one
local TEMPHTML = ""
local url ="http://www.dilbert.com/"
local objXMLHTTP = luacom.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP:Open ("GET",url , 0)
objXMLHTTP:Send()
TEMPHTML = objXMLHTTP.responseBody
objXMLHTTP = nil
it throws me a error like ,
attempt to index global 'luacom' (a nil value)
stack traceback:
try.lua:1: in main chunk
[C]: ?
Again i tried with other options like
extracting these files in lua directory..
-http.lua
-code.lua
-concat.lua
-url.lua
from luasocket-1.4.zip from :
http://www.tecgraf.puc-rio.br/luasocket/old/luasocket-1.4/
and put them in the lua directory...
then i tried the below one
local TEMPHTML = ""
local url ="http://www.dilbert.com/"
TEMPHTML = HTTP.get(url)
But it throws me a same error like ,
attempt to index global 'luacom' (a nil value)
stack traceback:
try.lua:1: in main chunk
[C]: ?
I have installed Lua for windows from http://www.lua.org/download.html
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.