Jump to content
  • Advertisement
Sign in to follow this  

WriteConfigToStream fails to reset namespace

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

The WriteConfigToStream function in scripthelper.cpp fails to reset the namespace when it writes out the string factory and array type. This can result in the wrong namespace being used. For example:

prop "const uint ClientDisconnect"
namespace "Hooks::Game"
prop "const uint MapChange"

// String factory
strfactory "string"

// Default array type
defarray "array<T>"

These are the last few lines of a config i'm reading in.


Should be easy enough to fix, just add the same code to reset the namespace. I would recommend refactoring that code so the logic is in its own function, perhaps turn these helpers into classes so the current namespace is kept as a member. That's simpler than passing in a reference.

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!