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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
icedsun
Novice


Joined: 20 Jan 2006
Posts: 45
Location: Minnesota

PostPosted: Wed Jan 25, 2006 7:24 pm   

Plugins/COM/Compiling Issues
 
Okay - first of all I'd like to apologize for even having to post this here and wasting everyone's time!!! So: "I'm sorry!"

Basically - I've written a Texas Hold 'Em Poker Bot with zMUD and it works perfectly! The only function of this Poker Bot that I did not want to do within zMUD was the final hand evaluation (to determine which hand/hands win the pot) due to the huge number of enumerations required and the fact that it would be extremely difficult to do under zMUD. Luckily, there's some wonderful poker eval code out there (available from pokersource.sourceforge.net) Now, here's my problem: I am CLUELESS when it comes to compilers. I have absolutely no idea how to compile that code as a COM object (yes I've read Zugg's informative COM pages explaining how to make one from scratch in Delphi and VB.) But, I just can't find a good step-by-step anywhere of how to take existing 'C' code and compile it into a .dll or .exe with COM functionality. The compiler I have right now is Microsoft's Visual C++ Express Edition (Their free edition.) I am able to successfully compile that poker software and get a .dll (which I am unable to open with Zugg's handy little TIViewer.exe - due to my guess that my .dll wasn't compiled with the COM parts to it.) Also, I am able to compile a .exe (also, without any COM functionality to it that i'm aware of) which, when I run the program (ie: at command line: pokenum.exe -h Ac Ad - Kc Kd -- 2s 2h 4s 5h Kh) will come back and return the proper winner of that poker hand. However, there's no way to have zMUD do a command-line run of that .exe file and return that value to me as a #VAR or anything, is there??? That would be a simple little quick-fix I suppose. However, if anybody wants to dedicate and devote (ie: waste) their time trying to teach an infant like me how to get C code to compile under MSVC++ into something with COM functionality or even as a plug-in, I would be extremely grateful to you. Thanks to all for taking the time to even read through this little mess! Thanks to Zugg for a wonderful program.

(zMUD 7.21)
(MSVC++ 2005 Express Edition)
(poker-eval-128.0)

Thanks again everybody.

Oh, and a completely unrelated side-note: Am I the only person who "codes" in zMUD script and pretends that Aliases are Functions?
_________________
"Build a man a fire and he's warm for a night. Light a man on fire and he's warm for the rest of his life." --My Mom
Reply with quote
icedsun
Novice


Joined: 20 Jan 2006
Posts: 45
Location: Minnesota

PostPosted: Thu Jan 26, 2006 7:59 pm   Still no luck!
 
I've been just constantly working on this and trying to figure it out, but I still haven't gotten there yet. I guess just for a basic question I'll ask: can I spit out some values with zMUD to that regular little old .exe file and then read the output back into a #VAR? In my windows command line, when I type:
pokenum -h As Ah - Qs Qh -- 2s 3s 4s 5s 6s
The program then spits out the hand that won (As Ah)
What would be my way of having zMUD execute that .exe file and store its output? Or, is that not possible?

Second: If that's not possible - could somebody point me in a direction of where I might find some step-by-step information on creating a COM/OLE object in Microsoft Visual C++ (or what program I should use!!!) Sorry for wasting everyone's time - I'd just really like to get this working!
_________________
"Build a man a fire and he's warm for a night. Light a man on fire and he's warm for the rest of his life." --My Mom
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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