• Advertisement

Archived

This topic is now archived and is closed to further replies.

ExecuteString/function chaining/debug output

This topic is 5003 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement