Jump to content

  • Log In with Google      Sign In   
  • Create Account

- - - - -

Bug from 1.8.0


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.

  • You cannot reply to this topic
5 replies to this topic

#1 abrken   Members   -  Reputation: 130

Like
0Likes
Like

Posted 18 August 2004 - 04:42 AM

I have found a bug, and I think that this is a bug, because every script writter can fall into this. To see the bug in action just take the last WIP (I have the same bug working with 1.8.0 too !) Take the testframework project too. In TestExecute4Argsf (or any other function), replace this line engine->ExecuteString(0, "cfunction(9.2f, 13.3f, 18.8, 3.1415f)", NULL, 1000, 0); with this line engine->ExecuteString(0, "{cfunction(9.2f, 13.3f, 18.8, 3.1415f)", NULL, 1000, 0); Can't see any difference ? Yes, I have included a '{' at the begining of the script but hey, no '}' at the end ! This is a match error ! Now compile the testframework, and run it : You get an Assert caused by asCParser::GetToken function. Regards, AbrKen

Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3343

Like
0Likes
Like

Posted 18 August 2004 - 06:56 AM

I've confirmed the bug. It will be fixed for the next release.

Thanks for letting me know, Abrken.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#3 Andreas Jonsson   Moderators   -  Reputation: 3343

Like
0Likes
Like

Posted 18 August 2004 - 07:09 AM

Found the bug already. The fix is:

Change the if statement in function asCParser::GetToken() at line 1492 in as_parser.cpp to:


if( sourcePos >= sourceLength )
{
token->type = ttEnd;
token->length = 0;
}
else
token->type = tokenizer.GetToken(&script->code[sourcePos], sourceLength - sourcePos, &token->length);




The line number is for the latest work in progress. It might not be the same in earlier versions, but it shouldn't be too hard to find from the description.

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

#4 Andreas Jonsson   Moderators   -  Reputation: 3343

Like
0Likes
Like

Posted 18 August 2004 - 07:17 AM

What's your name Abrken? I would like to credit you for finding the bug.

Of course, if you prefer not to tell your name that's fine. I'll just credit you as Abrken.

Thanks,
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

#5 abrken   Members   -  Reputation: 130

Like
0Likes
Like

Posted 18 August 2004 - 08:50 PM

- Changed my profile :)
- Changed the code (in my old 1.8.0 !).
- Confirmed the bug eradication.


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)


Great thank's for reactivity and best regards,

AbrKen.

#6 Andreas Jonsson   Moderators   -  Reputation: 3343

Like
0Likes
Like

Posted 19 August 2004 - 01:50 AM

Thanks for the confirmation, Alain.


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.



PARTNERS