8
lxmcf
7y

Oh thank god!
Had an error in my COSMOS project and had no clue what was happening, so apparently cosmos allows you to cast using an interface when declaring variables and comparing yet it doesn't let you cast with an interface when trying to execute a function... The fuck?

Comments
  • 1
  • 3
    @JoshBent you’re leaving a trail of breadcrumbs?
  • 2
    @C0D4 haha thats a new take on it, its like I am leaving a trail from my night to my morning self, but really I just sub to threads that way
  • 1
    And I just realized how shit that description was, here is the example

    This works:
    ((CommandManager)features["Command Manager"]).Evaluate(lexed[0], lexed.RemoveFirst());

    This doesn't:
    ((ICommandManager)features["Command Manager"]).Evaluate(lexed[0], lexed.RemoveFirst());

    But I can change variable's in the command manager by casting as the interface, just can't execute functions :-P
Add Comment