Closed oslvbo closed 10 years ago
I assume this is a problem with the KopiLua/Mono version? In the normal version this work fine... Therefore I assume that this is problem with KopiLua itself. They have a REPL-style application there, maybe you can test the code with that app? You probably should open a bug report there.
The name loadfile
sound like you try to load a lua file to execute the code in it. Maybe you should have a look a DoFile()
instead? But I could be wrong :smile:
That's right, it's about KopiLua, not about DynamicLua.
"file" here I written is used to read some data, but I have written the code with C#.
So many thanks for your help, nrother!
I'm glad you found a workaround! Maybe you should file a bug for KopiLua? It looks like something that is easy to fix (probably they just got the line numbers messed up by one)
When I code like this:
open() is ok, but it will throw function error() when load on call "for line in file:lines()". Is there any method can fix this problem?