Jump to content
  • Advertisement
Sign in to follow this  
luke2

Making your code a script's referenced assembly

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

Alrighty, I've been messing with CodeDom lately and it looks to be very promising for scripting. Here is my problem: script file
using System;
using System.Windows.Forms;
using DomTest; //The namespace where class script should be...

class test
{
	public static script init()
	{
	        script data = new script(); 
		data.x = -1; 
		return data; 
	} 
}
Now, Whenever I try to invoke init I get an exception. Currently I am trying to pass the script the reference which it needs by this method, also I am using C++/CLI to maintain inter language capabilities. (compilerparamters^) params->ReferencedAssemblies->Add( "DomTest.script" ); //I figure this string here is the issue. the script class is defined as:
namespace DomTest
{
    ref class script
    {
    public: 
	int x; 
    };
}
I can give the code access to 'official' namespaces like System by params->ReferencedAssemblies->Add( "System.dll" ); However, my code is in an exe (although, since I am making a library, it will be released as a .lib) So, how can I give the script file access to datatypes defined in my code?

Share this post


Link to post
Share on other sites
Advertisement
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!