Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error: Ambiguous MainStep #39

Closed
raoulkent opened this issue Nov 10, 2017 · 3 comments
Closed

Compilation error: Ambiguous MainStep #39

raoulkent opened this issue Nov 10, 2017 · 3 comments

Comments

@raoulkent
Copy link

After editing SetMiningSiteBookmark, UnloadBookmark & RetreatBookmark to test bookmarks in-game - then attempting to Play the script I get a error as follows:

"CaptionString": "System.Exception: compilation error: (64,29): error CS0121: The call is ambiguous between the following methods or properties: 'MainStep()' and 'MainStep()'\r\n at BotSharp.ScriptRun.ScriptRun.<>c__DisplayClass61_0.<Start>b__0()", "LineIndex": 63, "CharacterIndexInLine": 28, "LineIndexInAvalonEdit": 64, "CharacterIndexInLineInAvalonEdit": 29

@Viir
Copy link
Collaborator

Viir commented Nov 11, 2017

This looks like a compilation error, indicating that the script is not valid C#. Do you have a link to a diff view with the file from https://github.com/Arcitectus/Sanderling/blob/master/src/Sanderling/Sanderling.Exe/sample/script/Mine.ore.cs as base?

@Viir
Copy link
Collaborator

Viir commented Nov 11, 2017

Do you have more than one MainStep methods in your script?

@raoulkent
Copy link
Author

Ah, I identified the issue. I had imported the code twice, resulting in duplicates of all function names, therefore causing a ambiguity problem.

After clearing the 'edit script' area and re-importing everything is working fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants