Wolf Planet Forum Index Wolf Planet
We want you here!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

I've got some new problems with my source code...
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Wolf Planet Forum Index -> Coding Alliance
View previous topic :: View next topic  
Author Message
lizardcommando
Soldier


Joined: 31 May 2005
Posts: 48

PostPosted: Sun Sep 11, 2005 6:18 pm    Post subject: I've got some new problems with my source code... Reply with quote

Although my rifle is fully functional, I have encountered some new problems:

When I use the all guns/keys/fullhealth cheat, I can not get the rifle. How do I modify the cheat so it does give me the rifle?

Also, if I pick up the rifle before I get the chaingun, I get the chaingun also. How do i fix that?

This is more of a minor problem, but if I shoot any of the guns, sometimes they sounds won't play at all. Same goes with enemies. They sometimes won't play sounds. How do I fix this?
Back to top
View user's profile Send private message
Dr. Chainsaw
Corporal


Joined: 05 Sep 2005
Posts: 78
Location: Jolly old England

PostPosted: Mon Sep 12, 2005 2:22 pm    Post subject: Reply with quote

Yeah just ignore me! Evil or Very Mad The sound thing. That is not really a problem. I get that playing loads of other people's mods. It's nothing to worry about!!!!! Mad Mad
Oh and the Chaingun pickup thing;

http://www.btinternet.com/~belowe/weaponcollection.htm
_________________
Flymos rush in were chainsaws fear to tread
Wolf3dcastle forum;
http://www.1-2-free-forums.com/mf/wolf3dcastle.html
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Hair Machine
Newbie


Joined: 21 Feb 2005
Posts: 12
Location: Down a hole

PostPosted: Mon Sep 12, 2005 5:00 pm    Post subject: Reply with quote

And to answer your cheat question, open the WL_PLAY.C file and to a search for 'MLI'. You should find a line that says "// SECRET CHEAT CODE: MLI"

Below this goes all the stuff that happens when you press that key combo. So, for example, "GiveWeapon (wp_chaingun);" will give a chaingun (and because of the way this function works, all the guns weaker than it). Either edit this to make it give your rifle, or, if you implemented the tutorial Chainsaw just showed you, set "int rifle" - or whatever you called it - to 1 in the same place.

That should fix it.
_________________
Remember... Rajan is a gimp.
Back to top
View user's profile Send private message Visit poster's website
Dr. Chainsaw
Corporal


Joined: 05 Sep 2005
Posts: 78
Location: Jolly old England

PostPosted: Mon Sep 12, 2005 5:39 pm    Post subject: Reply with quote

If you did that and used the tutorial I gave, when you use the MLI cheat will it just give you the rifle and not the chaingun?
_________________
Flymos rush in were chainsaws fear to tread
Wolf3dcastle forum;
http://www.1-2-free-forums.com/mf/wolf3dcastle.html
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Hair Machine
Newbie


Joined: 21 Feb 2005
Posts: 12
Location: Down a hole

PostPosted: Mon Sep 12, 2005 7:31 pm    Post subject: Reply with quote

Hmm.. actually, it would only give the Chaingun and the Rifle. So you'd need to put:

GiveWeapon(wp_pistol);
GiveWeapon(wp_machinegun);
GiveWeapon(wp_chaingun);
GiveWeapon(wp_rifle); // change to suit

to get ALL weapons if you enabled Joe's tutorial.
_________________
Remember... Rajan is a gimp.
Back to top
View user's profile Send private message Visit poster's website
lizardcommando
Soldier


Joined: 31 May 2005
Posts: 48

PostPosted: Mon Sep 12, 2005 9:53 pm    Post subject: Reply with quote

Dr. Chainsaw wrote:
Yeah just ignore me! Evil or Very Mad The sound thing.


About the sound thing, the reason why I am concerned is that in my unedited source version, the sound plays. But in the edited source version, it doesn't play the weapom sound most of the time.
Back to top
View user's profile Send private message
Dr. Chainsaw
Corporal


Joined: 05 Sep 2005
Posts: 78
Location: Jolly old England

PostPosted: Mon Sep 12, 2005 10:00 pm    Post subject: Reply with quote

Maybe it has something 2 do with memory? Just incase it has here's some help on freeing up memory;

http://www.areyep.com/Codingtips/cleansrc.html
_________________
Flymos rush in were chainsaws fear to tread
Wolf3dcastle forum;
http://www.1-2-free-forums.com/mf/wolf3dcastle.html
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
lizardcommando
Soldier


Joined: 31 May 2005
Posts: 48

PostPosted: Wed Sep 14, 2005 1:15 am    Post subject: Reply with quote

Well, I added the SMG into the game, but I can't see the pickup sprites, therefore, I can't use it. Also, I tried the cheat, but I didn't get the rifle and the smg along with the rest of the guns.

I followed that tutorial that was posted with the guns. I also had to combine the new weapons tutorial by Deathshead. But the damn thing still won't work though. Evil or Very Mad

I don't know what I'm doing wrong...

EDIT:Ok, I looked at the code and I think I may have figured out the problem, but now when i try to compile it, I get these errors:

Code:
undefined symbol 'bo_rflbullets1'
duplicate case
undefined symbol 'bo_smg1'
duplicate case



NOTE: rflbullets is the name of the item. It's not a mispelling.

The ':' would be highlighted as the problem. This problem occurs in wl_act1. What does this mean?
Back to top
View user's profile Send private message
Hair Machine
Newbie


Joined: 21 Feb 2005
Posts: 12
Location: Down a hole

PostPosted: Thu Sep 15, 2005 9:41 pm    Post subject: Reply with quote

Did you remember to define the bo_ item sprite in Wl_def.h? Just search for bo_ and add it on the end if not. That's all I can think of right now. Smile
_________________
Remember... Rajan is a gimp.
Back to top
View user's profile Send private message Visit poster's website
lizardcommando
Soldier


Joined: 31 May 2005
Posts: 48

PostPosted: Thu Sep 15, 2005 10:48 pm    Post subject: Reply with quote

Hmm, I think I did. I'll go check right now.
Oh and here's the rest of the errors I got as well:

(it also includes the first ones I mentioned earlier)

Code:
Error WL_ACT1.C 114: Undefined symbol 'SPR_RFLBULLETS1'
Error WL_ACT1.C 114: Declaration syntax error
Error WL_ACT1.C 114: Unexpected }
Error WL_ACT1.C 114: Declaration terminated incorrectly
Error WL_ACT1.C 119: Unexpected }
Error WL_ACT1.C 181: Constant expression required
Error WL_ACT1.C 181: Duplicate case
Error WL_ACT1.C 183: Undefined symbol 'bo_smg1'
Error WL_ACT1.C 183: Duplicate case
Error WL_ACT1.C 188: Expression symbol


EDIT: Yeah, I did just that. I added in the bo_ stuff in wl_def.h, but it's still giving these following errors.
Back to top
View user's profile Send private message
Hair Machine
Newbie


Joined: 21 Feb 2005
Posts: 12
Location: Down a hole

PostPosted: Fri Sep 16, 2005 10:56 pm    Post subject: Reply with quote

Oh dear lord... you seem to have missed something; either a semicolon at the end of a command line, a comma, or you've been messing around with the curly brackets. To fix this you'll need to know about C++ syntax, or just look at how the rest of the (working) code is written and try to figure out where you went wrong. This can be a pain in the ass. *ouch*

Anyway, look for ; , and { or } in the wrong places, and it'll definitely be something in WL_ACT1.C. I suggest looking around lines 100-114.
_________________
Remember... Rajan is a gimp.
Back to top
View user's profile Send private message Visit poster's website
lizardcommando
Soldier


Joined: 31 May 2005
Posts: 48

PostPosted: Sat Sep 17, 2005 1:39 am    Post subject: Reply with quote

Well, here's some of the coding from WL_ACT1. I still can't find the errors or anything in it Evil or Very Mad. Maybe you can find out what's wrong with it.

Code:
// WL_ACT1.C

#include "WL_DEF.H"
#pragma hdrstop

/*
=============================================================================

                     STATICS

=============================================================================
*/


statobj_t   statobjlist[MAXSTATS],*laststatobj;


struct
{
   int      picnum;
   stat_t   type;
} statinfo[] =
{
{SPR_STAT_0},               // puddle          spr1v
{SPR_STAT_1,block},            // Green Barrel    "
{SPR_STAT_2,block},            // Table/chairs    "
{SPR_STAT_3,block},            // Floor lamp      "
{SPR_STAT_4},               // Chandelier      "
{SPR_STAT_5,block},            // Hanged man      "
{SPR_STAT_6,bo_alpo},         // Bad food        "
{SPR_STAT_7,block},            // Red pillar      "
//
// NEW PAGE
//
{SPR_STAT_8,block},            // Tree            spr2v
{SPR_STAT_9},               // Skeleton flat   "
{SPR_STAT_10,block},         // Sink            " (SOD:gibs)
{SPR_STAT_11,block},         // Potted plant    "
{SPR_STAT_12,block},         // Urn             "
{SPR_STAT_13,block},         // Bare table      "
{SPR_STAT_14},               // Ceiling light   "
#ifndef SPEAR
{SPR_STAT_15},               // Kitchen stuff   "
#else
{SPR_STAT_15,block},         // Gibs!
#endif
//
// NEW PAGE
//
{SPR_STAT_16,block},         // suit of armor   spr3v
{SPR_STAT_17,block},         // Hanging cage    "
{SPR_STAT_18,block},         // SkeletoninCage  "
{SPR_STAT_19},               // Skeleton relax  "
{SPR_STAT_20,bo_key1},         // Key 1           "
{SPR_STAT_21,bo_key2},         // Key 2           "
{SPR_STAT_22,block},         // stuff            (SOD:gibs)
{SPR_STAT_23},               // stuff
//
// NEW PAGE
//
{SPR_STAT_24,bo_food},          // Good food       spr4v
{SPR_STAT_25,bo_firstaid},      // First aid       "
{SPR_STAT_26,bo_clip},         // Clip            "
{SPR_STAT_27,bo_machinegun},   // Machine gun     "
{SPR_STAT_28,bo_chaingun},      // Gatling gun     "
{SPR_STAT_29,bo_cross},         // Cross           "
{SPR_STAT_30,bo_chalice},      // Chalice         "
{SPR_STAT_31,bo_bible},         // Bible           "
//
// NEW PAGE
//
{SPR_STAT_32,bo_crown},         // crown           spr5v
{SPR_STAT_33,bo_fullheal},      // one up          "
{SPR_STAT_34,bo_gibs},         // gibs            "
{SPR_STAT_35,block},         // barrel          "
{SPR_STAT_36,block},         // well            "
{SPR_STAT_37,block},         // Empty well      "
{SPR_STAT_38,bo_gibs},         // Gibs 2          "
{SPR_STAT_39,block},         // flag            "
//
// NEW PAGE
//
#ifndef SPEAR
{SPR_STAT_40,block},         // Call Apogee      spr7v
#else
{SPR_STAT_40},               // Red light
#endif
//
// NEW PAGE
//
{SPR_STAT_41},               // junk            "
{SPR_STAT_42},               // junk          "
{SPR_STAT_43},               // junk            "
#ifndef SPEAR
{SPR_STAT_44},               // pots            "
#else
{SPR_STAT_44,block},         // Gibs!
#endif
{SPR_STAT_45,block},         // stove           " (SOD:gibs)
{SPR_STAT_46,block},         // spears          " (SOD:gibs)
{SPR_STAT_47},               // vines         "
//
// NEW PAGE
//
#ifdef SPEAR
{SPR_STAT_48,block},         // marble pillar
{SPR_STAT_49,bo_25clip},      // bonus 25 clip
{SPR_STAT_50,block},         // truck
{SPR_STAT_51,bo_spear},         // SPEAR OF DESTINY!
#endif

{SPR_STAT_26,bo_clip2},         // Clip            "
{SPR_RIFLE,bo_rifle},                   // rifle
{SPR_RFLBULLETS1,bo_rflbullets1},       // RiFLeBULLETS mgunclip
{SPR_RFLBULLETS2,bo_rflbullets2},       // RiFLeBULLETS pouches
{SPR_SMG,bo_smg1},                      // SMG
{-1}                     // terminator
;

/*
===============
=
= InitStaticList
=
===============
*/

void InitStaticList (void)
{
   laststatobj = &statobjlist[0];
}



/*
===============
=
= SpawnStatic
=
===============
*/

void SpawnStatic (int tilex, int tiley, int type)
{
   laststatobj->shapenum = statinfo[type].picnum;
   laststatobj->tilex = tilex;
   laststatobj->tiley = tiley;
   laststatobj->visspot = &spotvis[tilex][tiley];

   switch (statinfo[type].type)
   {
   case block:
      (unsigned)actorat[tilex][tiley] = 1;      // consider it a blocking tile
   case dressing:
      laststatobj->flags = 0;
      break;

   case   bo_cross:
   case   bo_chalice:
   case   bo_bible:
   case   bo_crown:
   case   bo_fullheal:
      if (!loadedgame)
        gamestate.treasuretotal++;

   case   bo_firstaid:
   case   bo_key1:
   case   bo_key2:
   case   bo_key3:
   case   bo_key4:
   case   bo_clip:
   case   bo_25clip:
   case   bo_machinegun:
   case   bo_chaingun:
   case   bo_food:
   case   bo_alpo:
   case   bo_gibs:
   case   bo_spear:
   case    bo_rifle:
   case    bo_rflbullets1:
   case    bo_rflbullets2:
   case    bo_smg1:
      laststatobj->flags = FL_BONUS;
      laststatobj->itemnumber = statinfo[type].type;
      break;
   }

   laststatobj++;

   if (laststatobj == &statobjlist[MAXSTATS])
      Quit ("Too many static objects!n");
}


/*
Back to top
View user's profile Send private message
Hair Machine
Newbie


Joined: 21 Feb 2005
Posts: 12
Location: Down a hole

PostPosted: Tue Sep 20, 2005 6:51 pm    Post subject: Reply with quote

Found it. I believe the problem is that you've got

Code:
{SPR_SMG,bo_smg1},                      // SMG
{-1}                     // terminator
;

when in fact you should have
Code:
{SPR_SMG,bo_smg1},                      // SMG
{-1}                     // terminator
};                        // notice the curly bracket?


There may be more, but I hope not!
_________________
Remember... Rajan is a gimp.
Back to top
View user's profile Send private message Visit poster's website
lizardcommando
Soldier


Joined: 31 May 2005
Posts: 48

PostPosted: Tue Sep 20, 2005 11:16 pm    Post subject: Reply with quote

I added it, but for some reason, it's still giving me the same errors... Mad

I'm going to try that Wolf17 program to see if I can make my weapons.

If that doesn't work... I'm gonna hate myself for doing this, but I'll try to recruit someone to do the coding...

EDIT: I tested out that Wolf17 program, and all I gotta say is that it's pretty good. I just wish you could add more frames and add in enemies or items, but it's good for what it has so far. I used it to test out the SMG's and it's looking good. Unfortunately, it isn't what I was looking for. That is, it's not doing the stuff I want to do.

There's only one thing to do... I guess it's time to recruit a coder...

So anyone want to help me code in the guns and a new enemy?
Back to top
View user's profile Send private message
Dr. Chainsaw
Corporal


Joined: 05 Sep 2005
Posts: 78
Location: Jolly old England

PostPosted: Wed Sep 21, 2005 6:55 pm    Post subject: Reply with quote

Maybe you have a problem with your compiler
_________________
Flymos rush in were chainsaws fear to tread
Wolf3dcastle forum;
http://www.1-2-free-forums.com/mf/wolf3dcastle.html
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Wolf Planet Forum Index -> Coding Alliance All times are GMT
Goto page 1, 2  Next
Page 1 of 2

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


Powered by phpBB © 2001 phpBB Group

Chronicles phpBB2 theme by Jakob Persson (http://www.eddingschronicles.com). Stone textures by Patty Herford.