OK, first of all, engine is just pointing to a random bit of memory, you need to call asCreateScriptEngine. You should then release this at the end of your program.
Secondly, AddScriptSection doesn't load the file for you. You need to load the file and get all of it's data and place it in a char array.
So, you should have somehting similar to this:
void RunScript(){ asIScriptEngine * engine = asCreateScriptEngine(ANGELSCRIPT_VERSION); const char * script = LoadScript("c:\\scriptfil.as"); //Get all the information from the file engine->AddScriptSection(0, "section", script, strlen(script)); engine->Build(0, NULL); ret = ExecuteScript(); asIScriptContext * ctx; engine->CreateContext(&ctx); //Prepare context ctx->Execute(); ctx->Release(); engine->Release();}
You will need to do error checking and I've probably missed a whole lot of stuff out, but you should get a feel for it.
The best examples (and the way I'm learning about angel script) are found in the test framework, you should download it and go through the code.
Hope this is enough to get you started.
EDIT: Changed some of the source code (forgot to add script section!)