Jump to content

  • Log In with Google      Sign In   
  • Create Account

- - - - -

ExecuteString/function chaining/debug output


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
4 replies to this topic

#1 Desdemona   Members   -  Reputation: 158

Like
Likes
Like

Posted 06 May 2004 - 06:56 PM

GetPlayerEntity()->SetBoundingSphere(5.0f)
Invalid command.
CEntity* p = GetPlayerEntity(); p->SetBoundingSphere(5.0f)
Command executed.
Each line is a string of statements I entered through my game''s console window and were executed using ExecuteString. When I pass the ExecuteString method I specify the output function, but I don''t ever see any error output. If I put the first command into a script file and then load it at init time, then AngelScript spits out is this:
Building...
Compiling function ''config'' in "scripts\config.script"
 Error   : (25, 19) Not a valid reference
Should function chaining work, or is it not supported? Should I be seeing output from ExecuteString, or does it not output the same stuff as when script normally get compiled?

Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3443

Like
Likes
Like

Posted 07 May 2004 - 07:31 AM

This has to be a bug in AngelScript. Both statements should be working in my opinion. ExecuteString should also output the error the same error because it uses the same compiler functions. I`ll have to check the code.

I`ll return with an answer later...

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

[edited by - WitchLord on May 7, 2004 2:34:25 PM]

#3 Andreas Jonsson   Moderators   -  Reputation: 3443

Like
Likes
Like

Posted 11 May 2004 - 11:32 AM

I''ve verified the compiler error and it really is a bug in AngelScript. The -> is expecting a reference to a pointer on the left side, but your function returns a pure pointer. This is of course wrong, AngelScript should be able to handle both types, and this will be fixed for the next version.

I was however not able to verify the problem with the missing output from ExecuteString(), in my test application it worked fine. Are you sure you set up the asIOutStream correctly?

ExecuteString() doesn''t output all the information that Build() does. For example strings like Parsing ''script section''... isn''t output. In the case of a working string ExecuteString() will not output anything, but if there are any errors they should be output in the same manner as Build().

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

#4 Desdemona   Members   -  Reputation: 158

Like
Likes
Like

Posted 11 May 2004 - 09:01 PM

Err, your right, the output works fine; it was an oversight in my code

#5 Andreas Jonsson   Moderators   -  Reputation: 3443

Like
Likes
Like

Posted 13 May 2004 - 09:47 AM

The latest beta should fix the problem you''re having with chained functions.

Check it out and let me know how it works.

__________________________________________________________
www.AngelCode.com - game development and more...
AngelScript - free scripting library - 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