Jump to content
  • Advertisement
Sign in to follow this  
WitchLord

AngelScript 1.9.0 WIP 4 (2004/08/31)

This topic is 5043 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

Dear subscribers, I've had quite a lot of slack time at work lately so I've been able to put in a few hours here and there on AngelScript, this is why you've been seeing so many updates lately. Today I bring you the first work-in-progress version of 1.9.0 with the following changes: - Renamed RegisterTypeBehaviour() to RegisterObjectBehaviour() - Removed the flags asCALL_RETURNBYVAL and asCALL_RETURNBYREF - Removed the flags asOBJ_IS_COMPLEX and asOBJ_IS_NOT_COMPLEX - Compiler no longer outputs unecessary messages, such as "Building..." - Each error message now follows a standard format: {section name} ({row}, {col}) : {Error or Warning} : {Message} - Included support for saving and loading compiled bytecode (thanks Dennis Bollyn) I will probably release at least one more WIP this week. Though I haven't decided if I'll add dynamically growing script stacks first, or dynamic binding between modules. Regards, Andreas Jönsson Author of AngelScript [Edited by - WitchLord on August 31, 2004 7:50:38 PM]

Share this post


Link to post
Share on other sites
Advertisement
Cool :)

Would it be very difficult to have something like typedef in the scripts? So we could define aliases for the angelscript datatypes.

I know that I could replace the types during binding generation myself, but one thing I use Angelscript for is to experiment with algorithms. Once they are done I would like to cut and paste them into my C++ code. Typedefs would help to keep the code intact.

Keep up the good work.

Regards
Tom

Share this post


Link to post
Share on other sites
EddHead:

Are you talking about translated messages? I don't think I will do this dynamically as it would be easier to just translate the static text strings in as_texts. If you want present the messages in a different way than is returned by the library you can easily do so by parsing the message. Every message follow the same pattern:

<script name> (<row>, <col>) : <Error or Warning> : <message string>

If this is not what you meant, perhaps you would like to tell me (again) in more detail just exactly what you need with custom messages.

zola:

It certainly would be possible, though it probably would require quite a lot of work. I'm sorry to say that I'll have to put this at the bottom of the to-do list.

Share this post


Link to post
Share on other sites
zola: how about using the typdef in your C(++) code? You can probably also do a simply search-and-replace, but that's most likely not the answer you want ;).

Share this post


Link to post
Share on other sites
What i meant was, if i needed to change messages like Building.... to something else, from the host app if necessary! i wasnt talking about the format of the error code, just the strings used in them, including removing them altogether, just to make sure i treat each type of script init seperately( different messages to each script module GUI / State Changes etc.)

Share this post


Link to post
Share on other sites
Well, I've removed unecessary messages altogether. You'll no longer see "Building..." nor "Completed (0 errors, 0 warnings)". The only messages that are output are error messages and warnings. This will allow you to write whatever you like before and after compiling.

If you want a count of the errors and warnings you'll have to do a search for ": Error" or ": Warning" in the strings. It will be a bit more work for the application writer, but not too much I think, and it gives more flexibility.

bool isError = strstr(msg, ": Error") ? true : false;


I have ideas of making the error messages even more standardized and give each one of them a message number. The message number can be used to filter output, show help text, or even translate the message string. But I don't think I'll do this for this version.

Share this post


Link to post
Share on other sites
All I really needed was a possibility to change the basic type names for uint8 uint16 etc.
It turned out to be really easy, I just extend the tokenWords array and added my token aliases.

Share this post


Link to post
Share on other sites
Quote:
Original post by WitchLord
The only messages that are output are error messages and warnings. This will allow you to write whatever you like before and after compiling.


As I was aswering to my last post about the '{' bug, I have realized that some messages are very important and hope that what you have written is partialy false :

in this compilation report

Building...
Parsing: "FlipImage"
Error : (53, 0) Expected expression value
Error : (53, 0) Unexpected end of file
Compiling function 'AcceuilEng_MOUSE_0' in "AcceuilEng_MOUSE_0"
Error : (4, 1) Function 'FlipImage' not found
Compiling function 'AcceuilFra_MOUSE_0' in "AcceuilFra_MOUSE_0"
Error : (4, 1) Function 'FlipImage' not found
Completed. (errors: 4, warnings: 0)


do the
Parsing: "FlipImage"
or
Compiling function 'AcceuilEng_MOUSE_0' in "AcceuilEng_MOUSE_0"
is still present in 1.9.x or not ?

If not, this is not a good thing because without those lines we wont be able to find in witch part of code the errors are detected when using multiple AddScriptSection call.

AbrKen.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!