lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I cannot get LuaSocket to run successfully.

I put the env.var as said in the manual. Maybe "\?.lua" and "\?.dll" are not
working.

I put the main files in my luabinaries folder. The only important subolder
seems to be "socket".

Tested with:
> socket = require("socket")
> print(socket.VERSION)
--> LuaSocket 2.0 (beta3)

Tested in folder "etc":
< lua get.lua http://www.goolge.com
dumping o.k.

Tested with:
> http = require("socket.http")
> print(http.get("http://www.tecgraf.puc-rio.br/luasocket";))
---> Error: attempt to call field 'get' (a nil value)

Tested with (Programming in Lua, Chapt.9):
    require "luasocket"
    host = "www.w3.org"
    file = "/TR/REC-html32.html"
    c = assert(socket.connect(host, 80))
    c:send("GET " .. file .. " HTTP/1.0\r\n\r\n")
    c:close()

--> Error: '=' expected near 'c'

Perhaps someone can help me?

blackrat