Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now
- - - - -

in and out keywords in parameters

4: Adsense

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
1 reply to this topic

#1 _Engine_   Members   

309
Like
0Likes
Like

Posted 28 January 2013 - 08:40 AM

Hi!

When we want to change income parametr in C++ function we just declare this - void SomeFunc(type& parametr). This are never was a trouble - never. But in managed languges we must add in or out keyword and that leads to unessesery work and sometimes to stupid mistakes. It is to sad that Angel Script force us to this annoing thing. It is possible to disable this behaveor - we don't want managed style we want c++ style :)

Edited by _Engine_, 28 January 2013 - 08:45 AM.


#2 Andreas Jonsson   Moderators   

4625
Like
0Likes
Like

Posted 28 January 2013 - 09:11 AM

engine->SetEngineProperty(asEP_ALLOW_UNSAFE_REFERENCES, true);

 

Of course, with this you'll have to trust your script writers to do the right thing as the script engine can no longer guarantee that all references are valid at all times. By doing this you cannot treat the scripts as a 'sandbox' anymore as it is quite possible to pass a reference to an object that will be invalidated during the execution of a function. 

 

Regards,

Andreas


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - 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.