i want pass variable angelscript c++. managed pass functions angelscript c++ , vice versa. can pass variables c++ angelscript, can't figure out how other way round. manual didn't me or have overseen part. can please give me hint? edit: as mentioned in comment here managed do. in test.as file: int add(int a, int b) { print("hello world, i'm angelscript\n"); multi(5, 13); print("c " + c + "\n"); return (a + b); } my test.cpp file: int multi(int x, int y) { int z = x * y; cout << "x aus dem skript: " << x << endl; cout << "y aus dem skript: " << y << endl; printf("ergebnis von multi x * y: %d\n", z); return z; } void print(string &msg) { printf("%s", msg.c_str()); } int _tmain(int argc, _tchar* argv[]) { int r; int c = 42; asiscriptengine *engine = ascreatescriptengine(angelscript_version); ...
Comments
Post a Comment