the underminer
Joined: 03 Oct 2005 Posts: 124 Location: Netherlands
|
Posted: Fri Nov 10, 2006 11:37 pm Post subject: how does loadstring work? |
|
|
How do I get this to work?
| Code: | assert(loadstring("response = 15"))
print(1,response) |
The result is 1,nil
here's what the lua 5.1 reference has to say:
| Quote: |
loadstring (string [, chunkname])
Similar to load, but gets the chunk from the given string.
To load and run a given string, use the idiom
assert(loadstring(s))()
|
_________________ Behold! The Underminer got hold of a PSP |
|