AngelScript 1.8.0c (2004/07/19)

Started by
30 comments, last by Dentoid 19 years, 9 months ago
Just to clarify: The string factory function is only called for string constants. It is used for converting the string constants to whatever type the application has registered for handling strings.

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
I can't imagine the next lines are intended this way ?

(as_scriptengine.h @ Line 960...)

if( systemFunctions[n]->returnType.GetSizeOnStackDWords() > 2 )
systemFunctions[n]->hostReturnMethod = asCALL_RETURNBYREF;
else
systemFunctions[n]->hostReturnMethod = asCALL_RETURNBYREF;


Since this if-statement is useless, the code for 'complex' objects compiles to the exact same code as the code for 'non-complex' objects...
_-=[ "If there's anything more important than my ego around, I want it caught and shot now." ]=--=[ BeatHarness ]=-=[ Guerrilla Games ]=-=[ KillZone ]=-
Quite useless indeed. ;)

I'll look into it as soon as possible. I guess my tests didn't cover that part of the code.

Thanks for letting me know, Lennart.

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

I've just uploaded version 1.8.0a that has a couple of bug fixes. One of them is very important for those that intend to use modules as only first module did compile correctly. The second (and any other modules) wasn't able to compile any function calls as the function ID got out of range. The other bug is the one Lennart mentioned above. In fact, both of the bugs were discovered by Lennart.

I think I need to improve my release program and have three library versions available for download at any one time: The current stable one, a feature complete beta version, and the work in progress. I'll probably start with this for the next release.

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

i dont remember the link but heres the .reg file code. name it as a reg file and change the extention to use as required
----------------------------------------
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\Languages\File Extensions\.as]
@="{B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}"
-----------------------------------------

maybe i will use the features in 1.8.0 but i am looking for a decent C++ syntax but thats it. i havent yet thought of what and how i will use the rest of the features. but will keep everyone
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.
Hi
Still working with Strings ;) which seem to work from time to time. I have the following script

void dir(String path, String filter){   CDirectory* dir=getDirectory();   dir->setFilter(filter);   dir->changeWorkingDirectory(path)}void main(){   dir(".", "*");}


This script doesn't work. it bails out when i call 'dir'.
But if I make the parameters call by ref 'void dir(String& path, String& filter)' everything works just fine.

I don't think this has something to do with the way I registered the string class, does it?

Btw: the error occures at line 69 in ac_array.h / access violation
this signatur works too void dir(String path, String& filter)
maybe something with the parameter passing for the registered string class doesn't work since passing multiple Integers etc. is working too...


[Edited by - zola on July 13, 2004 10:05:53 AM]
It could have something to do with how you registered the assignment behaviour function. This function is used to effectively assign a copy of your string to the parameter when sending it by value.

I'm not sure how the access violation for ac_array.h comes into the picture, I'll have to do some debugging.

Would it be possible for you to write a small test case in the test framework that reproduces the error and send it to me? That would help me find the problem. You'll find the test framework on the download page.

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

Hi Andreas

I send You the testcase as email.
BTW. I linked against the debug version of angelscript I hope this doesn't matter.
I have tracked the runtime error with vc7.1 to this location
file as_context.cpp
void asCContext::CleanStack(){  // TODO: Increase the numActiveContexts when cleaning the stack  // Run the clean up code for each of the functions called  CleanStackFrame();  while( callStack.GetLength() > 0 )  {    PopCallState();    asCScriptFunction *func=engine->GetScriptFunction(functionID);    byteCode = func->byteCode.AddressOf();    CleanStackFrame();  }}


'func' appears to be a null pointer at some time which causes the access violation call to ac_array.

OK, thanks.

I'll add an assert to the method and run the tests again. If func is null at any time for MSVC6 as well I should be able to find the bug. If it is indeed null for MSVC6 as well, it is very strange that I don't get an access violation though.

I will give the VC++ .NET 2003 Toolkit another try tonight. I hope that the debug output is compatible with MSVC6 so that I can debug the library, otherwise it will be a lot tougher for me to find any error.


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

This topic is closed to new replies.

Advertisement