lua-users home
lua-l archive

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


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