Log on:
Powered by Elgg

Kiasyn

Kiasyn's comment wall

Sandbox RSS

Immigration has moved

[img=files/CIMG2773.JPG]Immigration has moved.[/img]

Hi guys!

Long time no see. Really. I bet you thought I had forgotten about this site, right? Wrong. Truth is, I'm a very boring person. Nothing to write about. But today, I did something mildly interesting!

Compiling Spidermonkey

Quick guide to compiling Spidermonkey under Visual C++ Express 2005 Step 1: Download and extract spidermonkey from here: ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.60.tar.gz Step 2: Open the sr

Updates

So I am meant to be releasing Sandbox 1.0 soon, which I will be putting on this site of course. Random stuff: [url=http://www.deviantart.com/deviation/51112933/]Shazza's cool picture[/url] [url

New sites

http://sandbox.kiasyn.com/ has been upgraded to using the QSFPortal system with a nice skin (made by me) for it. http://sandboxdev.kiasyn.com/ shows what I have recently added to sandbox.
MudBytes

socketmud++: The Socket datatype

Alright. I picked up most of my programming knowledge outside a classroom setting, and outside of situations like these I'm generally the only one who sees my code, so I never really learned the conventions. I'll try to pay more attention to them next time I have someone look over some code. In the meantime, thanks again for all your help, that should hopefully be enough for me to work with for now.

socketmud++: The Socket datatype

Ungh, I'm sorry. Your first response and my quick reading made me think that the instance of the structure was called players; also, I'm following a convention where class names tend to be capitalized. (Having a good naming convention avoids a lot of potential confusion.) So you're right: if the variable is called player, then you access it with just player.

socketmud++: The Socket datatype

Ok, I'm confused. [code]struct players { std::string name; Socket *connection; } player [100]; [/code] I was under the impression that you access an individual member the structure using the bottom line. In this case I was attempting to compare a single object of the "players" type, not the "players" structure itself. I read [url=http://www.cplusplus.com/doc/tutorial/structures.html]here[/url]: [quote][code] struct product { int weight; float price; } apple, banana, melon;

socketmud++: The Socket datatype

Ah, I hadn't noticed that it was missing the "int", too. Good catch on that on. As for "players" vs. "player[x]": If the structure is called "players", then the only way to access it is using "players" -- if you use "player" and that works, then you're not talking to what you think you are. C/C++ are extremely literal this way: you will get [i]exactly[/i] what you type; it does not do any clever things for you. :smile:

socketmud++: The Socket datatype

Ah that was it, it was the capitalization. I also needed to put an "int" before number, and add another "=" like you said. For the record, I'm not sure, but I think even though the structure is called players, the individual members are called "player[x]". At any rate, it compiled ok without the "s", I need to go really soon, otherwise I'd try running the program. Thank you very, very, much for all your patience and help everyone.