I am overwritting the default chat for my plugin to use, and upon trying to send the chat to console using something like
I get the response of the following error:Code:global.ServerConsole.PrintColoured(System.ConsoleColor.Cyan, msg)
Is there a different way to run this in JavaScript? Or am I just applying it incorrectly?Code:[Oxide] 5:24 PM [Error] Failed to call hook 'OnPlayerChat' on plugin 'Ranks And Titles' (InvalidCastException: Cannot cast from source type to destination type.) [Oxide] 5:24 PM [Debug] at ServerConsole.PrintColoured (System.Object[] objects) [0x00000] in <filename unknown>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
Solved Cast Error when sending chat to console
Discussion in 'Rust Development' started by KillParadise, Mar 16, 2015.
-
the PrintColoured method expects params as int and string, but in JavaScript all numbers are double values and the method fails to convert...i've currently no idea how to fix it without patching the method...
-
Is there a work around I can pull to get around this issue instead?
-
Wulf Community Admin
-