Sign in to follow this  
ragavendrakk

hi, one question

Recommended Posts

hi, am back. I have question, i cannot allow any script to run in my host so before starting to run a script i want to scan for any possible illegal functions in script. Is there a way to use AS's apis to do it or use Builer/Compiler/Parse classes of AS to do it? Regards ragha

Share this post


Link to post
Share on other sites
Scripts in AngelScript cannot call any functions that haven't been registered with the script engine by the application.

There is currently no methods exposed that let you enumerate the functions that are called by the script. Though I suppose it wouldn't be too difficult to implement. Still, I really don't think you need this.

Regards,
Andreas

Share this post


Link to post
Share on other sites
hi,

My problem is similar to "Ideas for class inheritance" to this.
By checking the script code, i want to throw an exception that u have violated the rule of overriding as AS currently does not support this feature of "final" at compiler level. Pls give your suggestion, can i use asIScriptModule to do this checking or some other internal class is needed. Also as you had said earlier AS bytecode has no mapping to source code statements,is it right? If so how can i achieve it?

regards
ragha

Share this post


Link to post
Share on other sites
There is currently no built-in way to determine if a script class is overriding an inherited method. However, if you're willing to change the library a bit you could determine this by looking at the asCObjectType::virtualFunctionTable and determine if the method is from the base type or from the derived type.

What do you mean with mapping to source code statement?

Share this post


Link to post
Share on other sites
hi,

What do you mean with mapping to source code statement?
===>I had asked you how to retreive statements of functions, you had confirmed this is not saved in the Module/Builder,only transformed information is kept.

Thanks.

regards
ragha

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this