View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# AngelScript 1.10.1b STABLE (2004/12/01)

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.

16 replies to this topic

### #1Andreas Jonsson  Moderators

Posted 01 December 2004 - 11:31 AM

I continue my promise to keep version 1.10.1 updated with bugfixes. With this release I also wrote an article explaining the details on how to call script functions with parameters. You'll find that article in the library documentation.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Posted 01 December 2004 - 04:41 PM

Woah! That was FASST!! Anyway i'll get to spend some time on Angelscript for the next few days! Great to be back on the saddle!!
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.

Posted 11 December 2004 - 09:25 PM

error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
error LNK2005: __vsnprintf already defined in LIBCMT.lib(vsnprint.obj)
error LNK2005: _free already defined in LIBCMT.lib(free.obj)
error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)
error LNK2005: _strtol already defined in LIBCMT.lib(strtol.obj)
error LNK2005: _strtoul already defined in LIBCMT.lib(strtol.obj)
fatal error LNK1169: one or more multiply defined symbols found

i finally managed to port AS 1/7/x to 1.10.0b and this was what i got, i ignored LIBCMT.lib and they seem to show "invalid configuration" dring a build and throw an exception, maybe a newbie problem, but i just started the port and i hope it has an easy fix.

i'll update if i find any solutions. All i did for the port were include bstr and stdstring, change the syntaxes, if there is anysting specific i need to watch out for, i might need your help. Thank in advance.
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.

### #4Gyrbo  Members

Posted 12 December 2004 - 12:07 AM

Make sure both AS and your app are build with the same run-time library. (Project->Settings->C/C++->Code Generation)

### #5Andreas Jonsson  Moderators

Posted 12 December 2004 - 12:42 AM

Exactly. Gyrbo has the answer.

In particular you are getting these errors because you compile the library for multithreaded C runtime dll (default in AS project) and your application is probably set to singlethreaded static C runtime library (default in MSVC++ projects).

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

Posted 12 December 2004 - 06:48 PM

I made the Code Generation Options similar and i got the same error during Build. When would a Build Command give an "Invalid Configuration"?
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.

### #7Andreas Jonsson  Moderators

Posted 13 December 2004 - 01:04 AM

The Build() method reports "Invalid configuration" if one of the previous calls to a register method fails. You'll have to verify the return values from the calls to the register methods to find the exact error. I suggest you do it like this:

int r;r = RegisterObjectType(...); assert( r >= 0 );r = RegisterObjectMethod(...); assert( r >= 0 );r = RegisterGlobalFunction(...); assert( r >= 0 );

This will allow you to detect any invalid configurations in debug mode, and won't impact your release build.

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

Posted 13 December 2004 - 01:39 AM

I am trying it out, still dont know how they would seem to work in the older version though

warning C4121: 'asUPtr' : alignment of a member was sensitive to packing

this seems to be a warning i get in Debug mode only! i'll keep it updated.
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.

Posted 13 December 2004 - 02:07 AM

Just as i suspected, the Assert fails on every bstr call in the function prototype declaration, i have included asBstr.cpp and asBSTR.h files, is there anything else i might need to doublecheck?
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.

### #10Andreas Jonsson  Moderators

Posted 13 December 2004 - 02:09 AM

A lot of things have changed since 1.7.1, a call to a register method that worked before may not work with 1.10.1, although most of them should.

You mentioned before that you included both bstr and stdstring, you can't use both of them. Also you should use the bstr that is found in the test_feature project, as that is tested to work correctly.

I don't put bstr in the add_on folder anymore because I'd prefer if newcomers use the stdstring instead, which is much easier to use. But in your case, that already have the bstr working it's of course easier to continue to use the bstr.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Posted 13 December 2004 - 02:37 AM

r = engine->RegisterGlobalFunction("int AddImage( int Im, bstr caption, int x, int y, int width, int height )",
asFUNCTION(AddImage), asCALL_CDECL); assert( r >= 0);

This seems to cause the problem, basically whichever functions have a bstr in them, i would like to change it to stdstring if it's an easy step, if you can tell me how exactly to use them, cos i have used bstr only in the function prototypes. i would still prefer keeping to date rather than using a depracated method

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.

Posted 13 December 2004 - 03:12 AM

Dumb me, forgot to call Registerbstr!!!, tell more the new string anyway.
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.

### #13Andreas Jonsson  Moderators

Posted 13 December 2004 - 03:52 AM

Ahh, that explains it. [wink]

Well, if you want to use std::string instead of string, the first thing you'll have to do is to call RegisterStdString() instead of RegisterBStr(). It will register the 'string' type (not 'bstr'), so you'll have to change all your uses of 'bstr' to 'string'. Then you'll have to change all your registered application functions to receive std::string, instead of bstr. When using std::string you'll not have to worry about deallocating the memory in the application functions as C++ will do it for you, this is why I recommend using it instead of bstr.

Also, I haven't prepared any formatting functions like bstrFormat(), so if you're using them you'll have to write them yourself. That shouldn't be too much work, just use the bstr functions as a base and change them to return a std::string instead.

Regards,
Andreas

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

Posted 13 December 2004 - 04:35 PM

I dont use any of those Formatting functions so it wouldnt matter, Is there any other thing i need to keep in mind before i change to string?
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.

### #15Andreas Jonsson  Moderators

Posted 14 December 2004 - 12:47 AM

I can't think of any right now. Have you checked out the upgrade instructions available in the documentation for AngelScript?

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

Posted 14 December 2004 - 01:22 AM

Everything seems to work fine and the new version works great! Yippee!!! Massive Performance gains, i have'nt officially tested the changes though! will get back with results!
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.

### #17Andreas Jonsson  Moderators

Posted 14 December 2004 - 03:31 AM

That's great to hear :D
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.