Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


- - - - -

Ignoring selected script calls on compile


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 jetro   Members   -  Reputation: 144

Like
0Likes
Like

Posted 27 July 2004 - 05:51 AM

What about a feature which allows you to selectively ignore certain calls totally when compiling a script? This would allow construction of an assert-function, for example. So that it could be decided on runtime if the script is being compiled as a "debug" build (with asserts) or as a "release" build without any extra code like this. In API this could be as simple as allowing registration of NULL as method or function pointer. Inside script build code any calls to functions or objects would be just ignored if their handler is NULL. Then application could register NULL handlers instead of the true handlers when it wants to leave the additional debugging code out which is written into the scripts. Alternatively the API could have an option to flag certain functions or methods to be conditional for usage, and on a call to script build it would be told if the conditional stuff should be ignored or compiled normally. Disclaimer: I haven't tried if it would already work this way, although I doubt that would be the case. :-)
--Jetro Lauha - tonic - http://jet.ro

Sponsor:

#2 Gyrbo   Members   -  Reputation: 187

Like
0Likes
Like

Posted 27 July 2004 - 05:54 AM

You could probably preproccess the script yourself, stripping out all calls yourself. I'm guessing it's probably faster to use an empty function, though.

#3 Andreas Jonsson   Moderators   -  Reputation: 3437

Like
0Likes
Like

Posted 27 July 2004 - 06:58 AM

This is actually a pretty good idea.

It would only work on functions that doesn't return anything though, i.e. void.

I'll write down the suggestion in my to-do list so I don't forget it. Thanks jetro.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS