Jump to content

  • Log In with Google      Sign In   
  • Create Account

- - - - -

verify code


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
1 reply to this topic

#1 mk1x86   Members   -  Reputation: 442

Like
0Likes
Like

Posted 24 February 2012 - 05:23 AM

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:
void dummy1(int foo);
void dummy2(unsigned int foo);
int dummy3(int foo);
...

Is there any other way to do this?

Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3445

Like
0Likes
Like

Posted 25 February 2012 - 05:29 AM

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