[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: tolua++, lua and array indexes
- From: Luo Hei <luo_hei@...>
- Date: Sun, 25 Nov 2007 11:00:37 -0500
I have generated wrapper code with tolua to access my C++ classes. But I
have found a problem.
Lets suppose I have the following:
enum Indexer {
A=0, B, C
}
class test {
int array{C}
}
In lua scripts, using array[A]=something works fine. But if I use
array[C]=something I got an error message about indexing out of range.
How can I solve this? A quick and dirty workaround is to add an extra
element to all arrays as filler, so C is no longer the last index.
--
http://dsgp.blogspot.com | Linux, programación, juegos
Have no place I can be since I found Serenity
But you can’t take the sky from me
______________________________________________
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com