Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
johnt
Newbie


Joined: 23 Oct 2015
Posts: 1

PostPosted: Fri Oct 23, 2015 9:52 am   

Adding C#
 
Can someone give me a rundown of how to get C# added to the scripting languages for CMUD?

Thanks in advance!
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4584
Location: Pensacola, FL, USA

PostPosted: Fri Oct 23, 2015 11:16 am   
 
It should just be a matter of having the C# libraries installed on your system.
Then it should appear in the languages dropdown list of a given setting.
_________________
Discord: Shalimar#3679
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Sat Oct 24, 2015 5:27 am   
 
C# is not a scripting language, it's a full programming language. It can't be embedded in other environments, only to create standalone executable binaries.
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Sat Oct 24, 2015 4:47 pm   
 
I make extensive use of C# as an scripting extension. Once you understand that CMUD is both a server and a client you can take advantage of this feature. The way I communicate between zscript with C# is via COM using json to pass data back and forth.
The place to start is here.
Here you will find the front end of a C# application that communicates with CMUD.

Here is the script to connect:
Code:

$connStr = "sqlServer.Agent"
;;
#VAR comsrv %comcreate( $connStr)

The variable comsrv now can be used in calls to the C# application: #call @comsrv.<methodname>(parameters)... Where methodname is any method in your application which is declared public.
_________________
Sic itur ad astra.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net