AngelScript 1.9.0 WIP 4 (2004/08/31)

Started by
44 comments, last by WitchLord 19 years, 7 months ago
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]

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Advertisement
Can you Add custom build/error messages to the TODO list of 1.9.0?
Jayanth.KRaptor Entertainment Pvt. Ltd.http://www.raptorentertainment.com---------------------------------------------------------Why Mr. Anderson? Why? ...Why keep fighting? Do you think you're fighting for something - for more than your survival? Can you tell me what it is? Do you even know? Is it freedom, or truth, perhaps peace, could it be for love? Illusions Mr. Anderson, vagaries of perception. Temporary constructs of a feeble human intellect trying desperately to justify an existence without meaning or purpose.
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
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.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

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 ;).
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.)
Jayanth.KRaptor Entertainment Pvt. Ltd.http://www.raptorentertainment.com---------------------------------------------------------Why Mr. Anderson? Why? ...Why keep fighting? Do you think you're fighting for something - for more than your survival? Can you tell me what it is? Do you even know? Is it freedom, or truth, perhaps peace, could it be for love? Illusions Mr. Anderson, vagaries of perception. Temporary constructs of a feeble human intellect trying desperately to justify an existence without meaning or purpose.
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.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

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.
Are you planning to support static variables in 1.9.0?
Jayanth.KRaptor Entertainment Pvt. Ltd.http://www.raptorentertainment.com---------------------------------------------------------Why Mr. Anderson? Why? ...Why keep fighting? Do you think you're fighting for something - for more than your survival? Can you tell me what it is? Do you even know? Is it freedom, or truth, perhaps peace, could it be for love? Illusions Mr. Anderson, vagaries of perception. Temporary constructs of a feeble human intellect trying desperately to justify an existence without meaning or purpose.
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 fileCompiling function 'AcceuilEng_MOUSE_0' in "AcceuilEng_MOUSE_0" Error   : (4, 1) Function 'FlipImage' not foundCompiling function 'AcceuilFra_MOUSE_0' in "AcceuilFra_MOUSE_0" Error   : (4, 1) Function 'FlipImage' not foundCompleted. (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.

This topic is closed to new replies.

Advertisement