🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Passing an array to application function

Started by
2 comments, last by WitchLord 19 years, 3 months ago
I want to know if it is possible to pass a pointer to the beginning of a script defined array to an application function. like: //script int[] x(50); FillArray(x, 50); //app void FillArray(int*x, size s) { //code to fill array }
Advertisement
Currently it is only possible if you override the array type you wish to receive. See the add-on/std_vector/stdvector.h for an example of how that can be done. You will then receive the array object just like a normal registered object.

I'm planning on implementing a specific interface for AngelScript arrays that will allow the application to manipulate script arrays without having to override the implementation.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Also, I'm sure there is a reason, but why does not the ASStdString.cpp file register the string methods such as find/replace/insert etc?


If there is not a good reason, I'll send you my registration of it for you to look at or include.
No reason at all. I just haven't written the registration for those methods.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement