Author Topic: Help with Crazy's Mod source code  (Read 4708 times)

0 Members and 1 Guest are viewing this topic.

Offline kumpy1

  • Newbie
  • *
  • Posts: 2
Help with Crazy's Mod source code
« on: February 03, 2015, 09:14:06 PM »
So I recently downloaded Crazy's latest source code intending to play around with some very minor tweaks (text editing is about all I'm good for LOL). I used Microsoft Visual Studio Express to create a new build but I keep getting this error "only static const integral data members can be initialized within a class". I get hundreds of those errors seemingly in every Cpp and .h file. Can anybody help me with this? I get these errors before I even edit any files.

Thanks

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Re: Help with Crazy's Mod source code
« Reply #1 on: February 04, 2015, 07:49:02 AM »
So I recently downloaded Crazy's latest source code intending to play around with some very minor tweaks (text editing is about all I'm good for LOL). I used Microsoft Visual Studio Express to create a new build but I keep getting this error "only static const integral data members can be initialized within a class". I get hundreds of those errors seemingly in every Cpp and .h file. Can anybody help me with this? I get these errors before I even edit any files.

Thanks
The game was originally written in c# and c++ was added later.
Depending on what version of VSE you are using, things load differently, I use VSE2013.
Try opening BrothelMaster-vse2013.vcxproj or BrothelMaster-vse2013.sln
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug

Offline kumpy1

  • Newbie
  • *
  • Posts: 2
Re: Help with Crazy's Mod source code
« Reply #2 on: February 04, 2015, 09:24:59 AM »
Yeah I tried to get VSE 2013 but unfortunately it won' t work on my older version of Windows. Stupid Microsoft not supporting their older products.

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Re: Help with Crazy's Mod source code
« Reply #3 on: February 04, 2015, 10:22:23 AM »
Yeah I tried to get VSE 2013 but unfortunately it won' t work on my older version of Windows. Stupid Microsoft not supporting their older products.
I have been trying to learn code::blocks to get away from microsoft but I keep getting linker errors and may need to rewrite the base code of the game to work around it.
If I ever finish converting it to SDL2, it will be written with code::blocks so anyone will be able to load, edit and compile the game no matter their os.
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug

Offline bigbillyjohn

  • Newbie
  • *
  • Posts: 3
Re: Help with Crazy's Mod source code
« Reply #4 on: February 18, 2015, 06:40:42 PM »
When I open BrothelMaster-vse2013.sln with VSE2013, it says it is incompatible, what could cause this?
I can open it fine in VS Professional 2013, but I get several potentially uninitialized local pointer errors when I try to compile it.
« Last Edit: February 18, 2015, 06:43:08 PM by bigbillyjohn »

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Re: Help with Crazy's Mod source code
« Reply #5 on: February 18, 2015, 07:16:58 PM »
When I open BrothelMaster-vse2013.sln with VSE2013, it says it is incompatible, what could cause this?
I can open it fine in VS Professional 2013, but I get several potentially uninitialized local pointer errors when I try to compile it.
Are you running the 32bit or 64bit VSE? I use 32bit.
Try opening BrothelMaster-vse2013.vcproj instead of BrothelMaster-vse2013.sln
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug

Offline bigbillyjohn

  • Newbie
  • *
  • Posts: 3
Re: Help with Crazy's Mod source code
« Reply #6 on: February 20, 2015, 10:54:13 AM »
I am running the 32 bit version, I don't think a 64 bit version exists. I can compile the sln or vcxproj after putting /wd4703 into the command line compile options to disable the warning. When I try to open the vcproj file, it says it needs to perform a one way upgrade. My current issue is that when I try to clean or rebuild the project, it says "1>Access to the path 'C:\...\BrothelMaster-vse2013.vcxproj.user' is denied."
EDIT: Deleting BrothelMaster-vse2013.vcxproj.user allowed me to clean/compile.
« Last Edit: February 20, 2015, 11:05:40 AM by bigbillyjohn »

Offline Aharon

  • Newbie
  • *
  • Posts: 1
Re: Help with Crazy's Mod source code
« Reply #7 on: March 01, 2015, 04:36:38 PM »
I got the same error some time ago, and researched a bit about it.


There's a simple fix, but it's handmade. I did it once some versions ago, and it did work.


If you change all definitions inside a class that look like this:


class item {
(Whatever)
durability=0;
}
Quote



To something like this:

class item {
(Whatever)
}
item::durability=0;
Quote

It compiled.

I think the fix was like that. You can try with only one line and test if it drops another error there.

Good luck.

PD: I use code::blocks. If you make it compile there, I'll be grateful. Last versions of Visual C++ are too heavy for my poor netbook, which I use to program.

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Re: Help with Crazy's Mod source code
« Reply #8 on: March 01, 2015, 05:49:42 PM »
I got the same error some time ago, and researched a bit about it.
There's a simple fix, but it's handmade. I did it once some versions ago, and it did work.
If you change all definitions inside a class that look like this:
I don't really know C# that well, more detail and examples would help.
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug

Offline Wirbelwind

  • Newbie
  • *
  • Posts: 5
Re: Help with Crazy's Mod source code
« Reply #9 on: March 03, 2015, 05:49:21 AM »
When I open BrothelMaster-vse2013.sln with VSE2013, it says it is incompatible, what could cause this?
I can open it fine in VS Professional 2013, but I get several potentially uninitialized local pointer errors when I try to compile it.
Don't know why it says it's incompatible.

As for those compile errors, you can use " /wd4703" parameter to make compiler ignore those errors. Or add nullpointer initializations to the classes.
cGirls.cpp Line 12953:
Code: [Select]
    sGirl* sprog;Change to:
Code: [Select]
    sGirl* sprog = nullptr; Also for me the debug environment compiles fine, but release version gets stuck on the pointer initializations.

I've attached patchfile to fix compile and runtime errors that I ran into. (svn revision 155)
You may ignore the cJobManager patches, I changed those because the debugger got caught at that type conversion. It seems that without debugging it runs fine.