Advertisement

Problem with SetDefaultNamespace in asIScriptModule

Started by May 26, 2024 09:00 PM
2 comments, last by WitchLord 3 days, 17 hours ago

Hello. There seems to be issues with the asScriptModule::SetDefaultNamespace method. The problem is that this method does not register the base namespace. For example:

module→SetDefaultNamespace("Namespace1::Namespace2")

In this example, the namespace "Namespace1::Namespace2" will be registered, but the namespace "Namespace1" will not be registered if it does not currently exist. Maybe need to add the following piece of code to asCScriptModule::SetDefaultNamespace?

// Make sure parent namespaces are registred in case of nested namespaces
if (expectIdentifier)
 	m_engine->AddNameSpace(ns.SubString(0, pos + len).AddressOf());

Thanks for letting me know. I'll look into this

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

Fixed in 3011. I'm sorry for the long delay.

https://sourceforge.net/p/angelscript/code/3011/

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

When I have problems at work or in my life, I find solace and relaxation by playing games at Pocket Pokies Casino. It's like taking a mini vacation from reality without having to leave the comfort of my own home. The bright colors, exciting sounds, and chance of winning some extra cash provide a much-needed distraction from whatever stressors are weighing me down. Check out the Pocket Pokies Casino review https://au.casinologin.mobi/review/pocket-pokies/ for insights on games, bonuses, and user experience! Whether I'm spinning the reels on my favorite slot machine or trying my luck at a game of blackjack, Pocket Pokies never fails to entertain me and lift my spirits. So, next time life throws you a curveball, why not give it a try and see if it helps you relax and forget your troubles for a little while?

None

Advertisement