Jump to content
  • Advertisement
Sign in to follow this  
zopenge

big problem in AS ... :(

This topic is 3786 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

class CombatFormual { // Interface const String& ProcessHit( _dword sourcelevel, _dword targetlevel, _dword sourceattackskill, _dword targetdefenseskill, const String& sourcetype, const String& targettype, _float sourcecriticalhitchance ) { return "Hit"; } }; when I build this script the AS compiler call MessageCallback( ) callback functions many many times .... But if I remove "const" string, then no erros occur ~~ is it a big bug in AS ? Just like : String@ ProcessHit( _dword sourcelevel, _dword targetlevel, _dword sourceattackskill, _dword targetdefenseskill, const String& sourcetype, const String& targettype, _float sourcecriticalhitchance ) { return "Hit"; }

Share this post


Link to post
Share on other sites
Advertisement
Script functions and methods returning references is not supported (yet). The correct way of doing it is by returning an object handle (as you already discovered).

I will however look into the compiler messages generated.

Share this post


Link to post
Share on other sites
Got it ~ Thanks for reply :-)
But I think the AS compiler is in the "dead loop" status, It told me the same error at the same line always.

Like (1,1) err : something wrong ...
(1,1) err : something wrong ...
(1,1) err : something wrong ...
etc...

Share this post


Link to post
Share on other sites
I guess this bug has already been fixed in a previous change because I couldn't reproduce the problem.

Which version of AngelScript are you using?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!