aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL
diff options
context:
space:
mode:
Diffstat (limited to 'LuaSL')
-rw-r--r--LuaSL/src/LuaSL_compile.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c
index d73b145..a9375d9 100644
--- a/LuaSL/src/LuaSL_compile.c
+++ b/LuaSL/src/LuaSL_compile.c
@@ -1,5 +1,23 @@
1#include "LuaSL.h" 1#include "LuaSL.h"
2 2
3/* TODO -
4Bit of a problem, but I think it will go away once llGetSubString() is implemented.
5The problem is that Lua can't convert the string "0x" to a number, though it's fine with "0x0".
6In LSL any string that does not represent a number gets converted to 0 by a typecast.
7
8In other cases the LSL code is typecasting a string to an integer, but Lua can't coz it's not a real number in the string.
9
10Sooo, should actually implement that typecast.
11
12function --[[integer]] channel()
13 return --[[(integer)]] ("0x" .. _LSL.llGetSubString( --[[(string)]] _LSL.llGetKey(), -4, -1));
14end
15
16function setBalls( --[[string]] cmd)
17 local --[[integer]] ch=channel();
18 _LSL.llSay(ch+ix, cmd);
19end
20*/
3 21
4 22
5static LSL_Leaf *evaluateFloatToken(LSL_Leaf *content, LSL_Leaf *left, LSL_Leaf *right); 23static LSL_Leaf *evaluateFloatToken(LSL_Leaf *content, LSL_Leaf *left, LSL_Leaf *right);