I have this in one plugin:
string playMode = "pve";
private string GetPlayMode() {
return playMode;
}
private void SetPlayMode(string newPlayMode) {
playMode = newPlayMode;
}And am calling these like so in another plugin:
[PluginReference] Plugin CoreManagePlayMode;
void Init() {
if (CoreManagePlayMode?.Call("GetPlayMode") == "pve") {
Puts("pve");
} else {
Puts("pvp");
}
}But whatever I try I get an error saying that `Cannot explicitly convert type 'object' to 'string'` - whatever I do I seem to get returned an object. How do I handle this so I get a string?
Thanks in advance.