AngelScript 1.6.1b released

Started by
11 comments, last by WitchLord 20 years ago
Finally managed to release the next version of AngelScript. This is the list of changes made since version 1.6.0:
  • bug fix: There was a memory leak in the tokenizer (thanks Philip Love)
  • bug fix: An exception occured when compiling method calls with objects as parameters (thanks Bartosz "Hans" Czuba)
  • More code cleaned up
  • BCONSTR and BDESTR are no longer used, instead BC_CALL is used
  • BCONSTR, BDESTR, STRDEL, STRCPY, STRMOV, and STRWRT has been removed
  • bug fix: break, continue, and return sometimes caused GenerateExceptionHandler() to fail since objects were destroyed more than once
  • Added support for the for-loop (thanks Erik J Baran)
  • Return values are now returned in a special register instead of on the stack
  • Added bytecodes SRET4, SRET8, RRET4, RRET8 for managing the return register
  • Added the calling convention asCALL_CDECL_OBJLAST for object methods. This calls the method as a normal C function with the object reference as the last parameter
  • The asMETHOD and asFUNCTION types are now defined macros instead
  • Removed the byte codes BCOPY, CALL is used instead
  • Type behaviours must be registered as either asCALL_THISCALL or asCDECL_OBJLAST
  • Pointers can now be compared with other pointers of the same type and level, or with 0 for null pointer tests
  • It is now possible to register overloaded operators for all dual operators, except assignment operators
  • Removed the byte codes STRCAT and STRCMP
  • bstr is now handled with operator overloads
  • bug fix: booleans are now 1 byte large, just as for C++ (thanks Josh "nihlist" Passenger for spotting the bug).
  • Cleaned up the code that compiles overloaded operators and function calls
  • Changed all the JMP instructions to use a 4 byte offset
  • Function overloading for registered functions and object methods is now supported
  • bug fix: When converting a constant to another type the value would become 0
I'll be updating the resources on the AngelScript page the next couple of days. Any questions, suggestions, or bug reports on version 1.6.1 may be posted here. Or directly to my e-mail. For the next version I've decided to include evaluation of simple lines of script without compilation. This has been requested by a couple of people as it would be extremely useful in for example quake style consoles. I'll also improve the ExecuteStep() function to support various types, like step into, step over, and step out of. Regards, Andreas __________________________________________________________ www.AngelCode.com - game development and more... AngelScript - free scripting library [edited by - WitchLord on March 23, 2004 1:41:23 PM] [edited by - WitchLord on March 30, 2004 7:59:30 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
1.6.1a brings a bug fix for working with registered properties of type bool.



__________________________________________________________
www.AngelCode.com - game development and more...
AngelScript - free scripting library

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

Im gonna go try this thing out.


Sharp Basic - Coming summer 2004!
Sign Up For Sharp Basic Beta Testing!!!
i''ve tried to compile angelscript with mingw using the DevCPP makefile.
He builds the Dll with no error, but when i link the libangelscript.a the linker tells me that there is an undefined reference to CreateScriptEngine ...

I was told that DevC++/MinGW exports the functions without the prefixed underscore, i.e where MSVC exports CreateScriptEngine as "_CreateScriptEngine@4" DevC++/MinGW exports it as "CreateScriptEngine@4". It could be that this is why you get an undefined reference.



__________________________________________________________
www.AngelCode.com - game development and more...
AngelScript - free scripting library

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

HEEEEEEEEEEELLLLLLLPPPP

I dont seem to have any luck with the new versions, i am still using 1.5.2 but i dont know why it doesnt work. The context is never created.

i seem to get these errors a lot

Error :
(1, 1) Name conflict. '' is a function.

what has this go to do with the new version?

I had to change GetFunctionID to GetFunctionIDByName in the new version. what is the difference here?

int funcID = engine->GetFunctionIDByName((const char *)funcname);
int r = ctx->Prepare(funcID, 512);

because of this ctx is never prepared, i would like to know how i could best link AS statically to determine what went wrong, what would be the right info you would like to know which would help you debug it ( if necessary ).

Thanks in advance

Jayanth.K
Raptor Entertainment Pvt. Ltd.
http://www.raptorentertainment.com

[edited by - EddHead on March 28, 2004 3:55:16 AM]
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.
You get the name conflict error if the name is already declared, either by the application in one of the Register functions or by another script statement.

You''ll need to take a look at your function names, global variables, etc. Some of them are using the same name.

There is no difference between GetFunctionID() and GetFunctionIDByName(), except the name of the method. The reason I changed the name of GetFunctionID() is because I declared another function GetFunctionIDByDecl() that was going to be implemented in version 1.6.x to support function overloading by script functions.

If your script doesn''t compile for any reason, i.e Build() returns a negative value you will not be able to get a function id nor prepare a context. First you need to find out why the build doesn''t work.

If you aren''t linking statically with AngelScript already I suggest you compile the library in debug mode and link with that dll instead. That way you will be able to go into the AngelScript functions to see where the error really is.

If you wish to set break points in the dll, you can add the dll for your debug session in the project settings->debug tab->category: additional dlls. Assuming you are using MSVC of course.

If you need more specific help than that you need to show me the exact error message that you get, and what the script that gives the error looks like. Also I might need to take a look at what functions, object, and properties you have registered with the engine.

__________________________________________________________
www.AngelCode.com - game development and more...
AngelScript - free scripting library

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

Oops!

The Error i seem to get is

Error :
(1, 1) Name conflict. ''' is a function.

( a null quote as a function at 1,1 is quite suspicious i guess ) cos i have checked all the routines. and i am using the same procedures to load the script as that of your sample program. and i havent changed a single thing except getfunctionID since 1.5.2 and 1.5.2 seems to be working fine.

I will try to statically link all the AS code to the program and get back.

Thanks
Jayanth.K
Raptor Entertainment Pvt. Ltd.
http://www.raptorentertainment.com


[edited by - EddHead on March 29, 2004 2:45:22 AM]
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.
It looks like you''ve stumbled upon a bug in AngelScript.

What does the first lines of your script look like? Is it possible for you to post them here? Or send them to me by e-mail?



__________________________________________________________
www.AngelCode.com - game development and more...
AngelScript - free scripting library

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

// cinematic function
// mission.as


// modes
const int DEAD = 0;
const int SLEEPING = 1;
const int UNARMED = 2;
const int WHITEALERT = 3;
const int YELLOWALERT = 4;
const int ORANGEALERT = 5;
const int REDALERT = 6;

// moods
const int AGGRESSIVE = 0;
const int DEFENSIVE = 1;
const int IDLE = 2;
const int STEALTH = 3;
const int FORAGE = 4;
const int CIVILIAN = 5;
const int VIP = 6;
const int CUSTOM1 = 7;
const int CUSTOM2 = 8;
const int CUSTOM3 = 9;

// trigger numbers
const int CHARREACHDEST = 0;
const int VEHREACHDEST = 1;
const int CHARACTERDEAD = 2;
const int CHARACTERHURT = 3;
const int VEHICLEDESTROYED = 4;
const int INSTANCEDESTROYED = 5;
const int CHARENEMYINRANGE = 6;
const int ANOTHERCHARINRANGE = 7;




Starts that way...........these things work fine in 1.5.2, i can send you the script in mail if u require. but i have declared about 200 functions for the scripting engine.



Thanks again


Jayanth.K
Raptor Entertainment Pvt. Ltd.
http://www.raptorentertainment.com
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.

This topic is closed to new replies.

Advertisement