🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

ExecuteString/function chaining/debug output

Started by
3 comments, last by Desdemona 20 years, 1 month ago
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?
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]

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

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

Err, your right, the output works fine; it was an oversight in my code
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

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