Page 1 of 2

Crashing!!

Posted: December 5th, 2011, 12:49 am
by lzrstrm
Im still trying to learn to use RPG Mode

so i start a new game under PlatinumArtsSandbox2.7.1\data\rpg\games
my game`s .cfg file says

Code: Select all

r_preparemap "winter1" 0

firstmap winter1
gameversion 1
compatversion 1

exec data/rpg/hud_standard.cfg
If i dont edit anything else it works fine and doesn`t crash when I select the game
But...
Everytime I add a new critter and a script for the critter, when i go to start my game it crashes and sandbox shuts down.



I have been given a patch for this, But i dont know how to install it.
If you can tell me how to install it or have a different fix THX



Patch

Code: Select all

        Index: trunk/src/rpggame/rpgrender.cpp
        ===================================================================
        --- src/rpggame/rpgrender.cpp   (revision 3359)
        +++ src/rpggame/rpgrender.cpp   (revision 3360)
        @@ -42,6 +42,7 @@

           void rendergame(bool mainpass)
           {
        +      if(!curmap) return;
              startmodelbatches();

              if(editmode)
The patch was given to me by Hirato
and im using Sandbox 2.7.1

Re: Crashing!!

Posted: December 5th, 2011, 12:07 pm
by arcones
Hopefully you've placed it in the right directory:

Code: Select all

Index: trunk/src/rpggame/rpgrender.cpp
Once you've done that, you'll need to compile Sandbox in order for the patch to work.

Re: Crashing!!

Posted: December 5th, 2011, 6:28 pm
by lzrstrm
@arcones

I dont even know how to use/Install the patch
all i know is i use the codeblocks program
can u give me a writen tutorial on how to use the patch and how to compile the code

Code: Select all

        --- src/rpggame/rpgrender.cpp   (revision 3359)
        +++ src/rpggame/rpgrender.cpp   (revision 3360)
        @@ -42,6 +42,7 @@

           void rendergame(bool mainpass)
           {
        +      if(!curmap) return;
              startmodelbatches();

              if(editmode)

Re: Crashing!!

Posted: December 5th, 2011, 8:00 pm
by arcones
lzrstrm wrote:@arcones

I dont even know how to use/Install the patch
all i know is i use the codeblocks program
can u give me a writen tutorial on how to use the patch and how to compile the code

Code: Select all

        --- src/rpggame/rpgrender.cpp   (revision 3359)
        +++ src/rpggame/rpgrender.cpp   (revision 3360)
        @@ -42,6 +42,7 @@

           void rendergame(bool mainpass)
           {
        +      if(!curmap) return;
              startmodelbatches();

              if(editmode)
First, when have the code, go to the root Sandbox folder (aka, PlatinumArtsSandbox2.7.1) Then, to src/rpggame/rpgrender.cpp

Place the code in that file and save. Then, compile Sandbox (since you have Codeblocks). I believe that will work.

Re: Crashing!!

Posted: December 5th, 2011, 8:08 pm
by lzrstrm
@arcones

do i add the code to the end of the file or do i erase everything then add it?

Re: Crashing!!

Posted: December 5th, 2011, 8:16 pm
by arcones
Definitely DO NOT erase the rest of it. I'm not 100% sure if you need to add it at a specific point in the file, but I don't think so. Adding it at the end should suffice.

Re: Crashing!!

Posted: December 5th, 2011, 8:18 pm
by lzrstrm
Ok now how do i compile sandbox?


I dont use this program ever so i dont know how to use it :P

Re: Crashing!!

Posted: December 5th, 2011, 8:20 pm
by arcones
To the wiki! Compiling the Source Code ;D

That should cover you!

Re: Crashing!!

Posted: December 5th, 2011, 8:50 pm
by lzrstrm
Its not compiling i get errors, how do i fix them?



this is the errors

Code: Select all

"Sandbox - krs" uses an invalid compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...
"Sandbox - pzl" uses an invalid compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...
Nothing to be done.

Re: Crashing!!

Posted: December 5th, 2011, 10:17 pm
by chocolatepie33
I also use Code::Blocks, you may require MinGW or another program to work.

To do that:

1) Get MinGW
2) Open Code::Blocks, go to settings, view compiler/debugger. Adjust paths as needed.