Advertisement

big problem in AS ... :(

Started by June 06, 2008 03:26 AM
3 comments, last by WitchLord 16 years, 5 months ago
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"; }
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.

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

Advertisement
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...
Ah, that would definitely be a bug. I'll fix it as soon as possible.

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

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