Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9067925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:03:55+00:00 2026-06-16T17:03:55+00:00

scripts/ai/Dream.boo import CultLib import LonelyHero class Dream(Enemy): pass C# var bc = new BooCompiler();

  • 0

scripts/ai/Dream.boo

import CultLib
import LonelyHero

class Dream(Enemy):
    pass

C#

var bc = new BooCompiler();
bc.Parameters.Input.Add(new FileInput("rsc/script/ai/" + "Dream" + ".boo"));
bc.Parameters.Pipeline = new CompileToMemory();
bc.Parameters.References.Add(Assembly.GetExecutingAssembly());
bc.Parameters.References.Add(Assembly.LoadFile(new DirectoryInfo("CultLib.dll").FullName));
bc.Parameters.References.Add(Assembly.LoadFile(new DirectoryInfo("sfmlnet-audio-2.dll").FullName));
bc.Parameters.References.Add(Assembly.LoadFile(new DirectoryInfo("sfmlnet-graphics-2.dll").FullName));
bc.Parameters.References.Add(Assembly.LoadFile(new DirectoryInfo("sfmlnet-window-2.dll").FullName));

var cc = bc.Run();

if(cc.GeneratedAssembly!=null)
{
    cc.GeneratedAssembly.CreateInstance("Dream", true, BindingFlags.NonPublic, null,
                                        new object[] {Parent, pos}, null, null);
}
else
{
    foreach (var error in cc.Errors)
        Console.WriteLine(error);
}

In the line bc.Parameters.References.Add(Assembly.GetExecutingAssembly()); I add the executing assembly, which contains the namespace “LonelyHero”. However, the error

rsc/script/ai/Dream.boo(2, 8): BCE0021: Namespace LonelyHero not found. maybe you forgot to add an assembly reference?

appears.

LonelyHero should exist, why does this error occur and what can I do to resolve it?

Note:
Upon replacing Assembly.GetExecutingAssmebly() with Assembly.GetAssembly(typeof(Enemy)) , thus assuring it adds the assembly with a class under the LonelyHero namespace, the same error occurs. Also with Assembly.LoadFile(new DirectoryInfo("LonelyHero.exe").FullName)

Occurs in Boo 0.9.4.9 and booxw-1203

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T17:03:56+00:00Added an answer on June 16, 2026 at 5:03 pm

    Imported namespaces in BOO need to contain at least one public type for the import to succeed; otherwise you will get the BCE0021 error, so you want to make sure the Enemy type is public (or another one).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Scripts var timer; var firing = false; var begen = function(id) { alert('one click');
I've two perl scripts, both of them wait for user to enter some input
Scripts like that: from PIL import Image, ImageOps img = Image.open('1.JPG') thumb = ImageOps.fit(img,
Scripts written for pear's "system_daemon" refuse to fork off to form new process. This
Scripts: $.ajax({ url: '/Widget/GetTestData', type: 'POST', data: {}, success: function (result) { var colModels
I have two scripts. First script is asking user for some input and calling
var scripts = document.getElementsByTagName(script); for (var i=scripts.length; i--; ){ (scripts[i]).parentNode.removeChild(scripts[i]); } Someone asked me
Which scripts/solutions do use for import and export large mysql databases? Phpmyadmin gives an
Instead of installing User-Scripts I found many tutorials on the web to add it
I have the following scripts: import socket import sys import traceback msg = socket.gethostbyname(socket.gethostname())

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.