Jump to content
  • Advertisement
Sign in to follow this  
ragavendrakk

hi, one question

This topic is 3123 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Thanks.

I was going through the code, looks like this class does the job,
"asIScriptModule"
I have to register the script as a module before using it, is this correct?

regards
ragha

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
Yes, that's true. If you need to show the original source code the application needs to keep a copy by itself, or reload it from the disk as needed.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!