[英]C# Errors - File wont compile
I have a code that I'm meant to compile into a .DLL file (it's for the game Call of Duty: Modern Warfare 3).我有一个代码,我打算编译成一个 .DLL 文件(它用于游戏《使命召唤:现代战争 3》)。 However, it wont compile.
但是,它不会编译。 Any ideas?
有任何想法吗? Thanks!
谢谢!
using MapEdit;
using Addon;
using System;
namespace mp_terminal_cls
{
public class mp_terminal_cls : MapEdit
{
public mp_terminal_cls()
{
}
createfloor(new Vector(2263f,4406f,286f),new Vector(2958f,4147f,286f));
public override void OnMapChange()
{
base.OnMapChange();
}
}
}
I get 7 errors, the problem is the original code was exactly the same.我收到 7 个错误,问题是原始代码完全相同。 I only added 2 new lines of code.
我只添加了 2 行新代码。 Here is the errors:
这是错误:
Sorry I'm quite new to C# I only have about 2 months experience with VB.对不起,我对 C# 很陌生,我只有大约 2 个月的 VB 经验。
1) Move the call to createfloor
either into the constructor's body or OnMapChange
's body (from your code, we can't tell which one you need): 1)
createfloor
的调用移动到构造函数的主体或OnMapChange
的主体中(从您的代码中,我们无法确定您需要哪一个):
public mp_terminal_cls()
{
createfloor(new Vector(2263f,4406f,286f),new Vector(2958f,4147f,286f));
}
or或者
public override void OnMapChange()
{
createfloor(new Vector(2263f,4406f,286f),new Vector(2958f,4147f,286f));
base.OnMapChange();
}
2) The base class MapEdit
doesn't seem to have a OnMapChanged
method. 2) 基类
MapEdit
似乎没有OnMapChanged
方法。
As a side-note, your classes and namespaces should have distinct names, to avoid ambiguity issues.作为旁注,您的类和命名空间应该具有不同的名称,以避免歧义问题。
There are essentially two errors基本上有两个错误
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.