sjoerd222
12-31-2006, 02:26 AM
Hi
Could anyone of you explain me how a script can call c++-functions or get acces to variables?
I tried to build something like a script language for a game that I am developing. But it's not so simple i saw. I have never done something like this befor. The only thing I can get working well is passing string, compare them, and call a related function, but thats ugly.
I thought about an build in Interpreter for my little game. Can anyone give me a good explanation how this works?
The Interpreterpart of my game can allready understand the syntax, but it lack calling c++ functions, storing Variables effectively (till now, they'r simply stored as strings in a selfbuild vector class). All function have one parameter of a self build type, which is a class containing various numbers of parameters (something like a vector).
Till now I have now idea how this is done by all the other languages. Does somebody now another way of calling C++ function by script?
thx!!!
Could anyone of you explain me how a script can call c++-functions or get acces to variables?
I tried to build something like a script language for a game that I am developing. But it's not so simple i saw. I have never done something like this befor. The only thing I can get working well is passing string, compare them, and call a related function, but thats ugly.
I thought about an build in Interpreter for my little game. Can anyone give me a good explanation how this works?
The Interpreterpart of my game can allready understand the syntax, but it lack calling c++ functions, storing Variables effectively (till now, they'r simply stored as strings in a selfbuild vector class). All function have one parameter of a self build type, which is a class containing various numbers of parameters (something like a vector).
Till now I have now idea how this is done by all the other languages. Does somebody now another way of calling C++ function by script?
thx!!!