lua-users home
lua-l archive

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


Hi

Loading a scriptfile of that size shouldn't be a problem to lua. 
However, 8kb could be just the packet size of a UDP/TCP packet for example - I
guess your network connection code could be the source of the problem - or the
lua compilation on your remote server (which system is it? 386?). 
Just an idea: let the remote server send back the source and look at the error
message if you receive and compile it and figure out what is going wrong. Maybe
there are some bad characters somewhere, due to the behaviour how the received
data is assembled.

Eike

> Hello everyone.
> 
> I am a programmer has been a long time, and always when I had a problem I
> google first and try to solve it by myself. When I am running out of options
> I ask help in forums and mail lists.
> So here I am now, to ask some help. :)
> 
> I am working on a cross-plataform system to run remote lua scripts.
> Everything was going really fine until a big problem. I am trying to solve
> this has been about three days but without success.
> 
> My application receives a lua script (string) from a remote server and run
> it using Lua5.1. Until here no problem, all test was successfull.
> But if this source script has more than 8 kbytes the lua_loadstring returns
> LUA_ERRSYNTAX.
> When I remove some lines until less than 8 kbytes the script runs. But if I
> include any kind of code lua_loadstring returns this error.
> My only conclusion is that lua_loadstring has a very limited buffer for the
> script. But actually I have no idea how to fix it.
> 
> Someone, please, could help telling me a solution or what's exactly is this
> problem?
> 
> By the way, I am trying to run it on Window XP, and the compiler (both my
> application and Lua5.1) is GCC 3.4.2.
> 
> Thank you all,
> 
> Lucas de Oliveira Teixeira
>