Sign in to follow this  
mk1x86

verify code

Recommended Posts

Don't know how to choose the topic.
I wrote an editor that features a script editor which does code verification (i.e. just builds the script and collects errors). Now here is the problem: The editor doesn't feature the character class because characters are only placed in the game and the editor doesn't need to know about them. So I saved the work to add the character class to the editor. Now the script editor returns me errors >> 'Character' is not a data type <<.
To circumvent this I'd register all object methods and properties to dummies. Since the return and parameters type vary a lot I'd need a lot of different dummy prototype functions which is a little tedious:
[CODE]
void dummy1(int foo);
void dummy2(unsigned int foo);
int dummy3(int foo);
...
[/CODE]

Is there any other way to do this?

Share this post


Link to post
Share on other sites
How about dumping the engine configuration with the add-on function WriteConfigToFile() and then loading it into the editor dynamically similarly to what is done in the asbuild sample? As the editor will not actually execute the scripts all the registered functions can just be null pointers, i.e. asFUNCTION(0). Properties can also be registered with a simple sequence number (to make them different).

You'll find WriteConfigToFile() in add_on/scripthelper/scripthelper.cpp.

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