Ginnungagap Posted May 4, 2010 Author Share Posted May 4, 2010 I was looking through the source code in Eclipse Stable (btw, I'm new to this),and was wondering why these variables are in several different files:```Public Const Black = 0Public Const Blue = 1Public Const Green = 2Public Const Cyan = 3Public Const Red = 4Public Const Magenta = 5Public Const Brown = 6Public Const Grey = 7Public Const DarkGrey = 8Public Const BrightBlue = 9Public Const BrightGreen = 10Public Const BrightCyan = 11Public Const BrightRed = 12Public Const Pink = 13Public Const Yellow = 14Public Const White = 15Public Const SayColor = GreyPublic Const GlobalColor = GreenPublic Const BroadcastColor = WhitePublic Const TellColor = WhitePublic Const EmoteColor = WhitePublic Const AdminColor = BrightCyanPublic Const HelpColor = WhitePublic Const WhoColor = GreyPublic Const JoinLeftColor = GreyPublic Const NpcColor = WhitePublic Const AlertColor = WhitePublic Const NewMapColor = Grey```I was wanting to edit the chat colors, and I'm not sure how to go about it now. Link to comment Share on other sites More sharing options...
Tyr Posted May 4, 2010 Share Posted May 4, 2010 The first row of const are the colors itself.You could write:```Public Const SayColor = Grey```OR```Public Const SayColor = 7```Its the same.If you want to edit the colors for the chat, edit SayColor. Its pretty self explanatory.Example:```Public Const SayColor = Yellow```OR```Public Const SayColor = 14```Using 'Yellow' is way easier to read, thats why there are 2 row of variables.i'm not pretty good at explaining things, but you'll get the hang of it.Have fun! Link to comment Share on other sites More sharing options...
Ginnungagap Posted May 4, 2010 Author Share Posted May 4, 2010 I realize that part is self-explanatory, but which file do I edit those values in?They are in several different places, and if I edit one, the others are still the default.Which one actually matters? Link to comment Share on other sites More sharing options...
Tyr Posted May 4, 2010 Share Posted May 4, 2010 Its been a while I opened up this source…I guess these variables can be found in both client and server.*checking*yes, in modConstants.modedit this file in both client and server and you'll be fine. Link to comment Share on other sites More sharing options...
Ginnungagap Posted May 4, 2010 Author Share Posted May 4, 2010 Haha, what about in modText under the Server? Link to comment Share on other sites More sharing options...
Tyr Posted May 4, 2010 Share Posted May 4, 2010 Err, I don't know about newer versions of eclipse… I stopped coding things before '2.8' came out.Try what I said, if it doesn't work I'm afraid I cannot help you. (ignore modText) Link to comment Share on other sites More sharing options...
Robin Posted May 4, 2010 Share Posted May 4, 2010 The variables aren't being declared in different files. That'd cause errors.They're only declared in modConstants on both the server and client. (Poorly, btw. It doesn't even give a datatype so they're all variant by default.) Link to comment Share on other sites More sharing options...
Ginnungagap Posted May 4, 2010 Author Share Posted May 4, 2010 Either way, changing any of the values for SayColor is not actually changing it.I've set them different in both files, and I have also set them to the same thing.On a side note, how are they not declared in different files if I am supposed to edit them in both places? Link to comment Share on other sites More sharing options...
Robin Posted May 4, 2010 Share Posted May 4, 2010 They're declared once in the server and once on the client.Make sure you're compiling both client and server after you've changed them. Link to comment Share on other sites More sharing options...
Ginnungagap Posted May 4, 2010 Author Share Posted May 4, 2010 I thought it auto-compiled, seeing how it corrected my mistake earlier…How do I compile a single file?Or do I need to open the whole project up and then edit the single file within the project? Link to comment Share on other sites More sharing options...
Robin Posted May 4, 2010 Share Posted May 4, 2010 You shouldn't be editing single files anyway. You should always edit the project through the .vbp file. When compiling it takes all the different forms and modules and classes and compiles into a single .exe file. You can't compile a single piece of that project."File -> Make [filename].exe" will make a fully compiled .exe file. "Ctrl & F5" will do a full compile & run which is best for debugging. Link to comment Share on other sites More sharing options...
Ginnungagap Posted May 4, 2010 Author Share Posted May 4, 2010 At first it gave me a "System Registry" error when trying to open the projects, which is why I was attempting to edit single files (because it let me do that).I just searched it and had to give VB6 admin rights.Just got it all working after the compile!Thanks so much.(Sorry for the hassle, I'm a JAVA programmer and it compiles classes separately)EDIT: also, it only requires the server file to be changed. Link to comment Share on other sites More sharing options...
Robin Posted May 4, 2010 Share Posted May 4, 2010 Ah, that explains it. Java is quite a bit different.It only requires the server to be changed because the server sends through the chat messages.I honestly don't know if the client-side variables are used for anything as I've never used Stable. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now