Author Topic: Guns in 2.1?  (Read 3885 times)

daelaskai

  • Guest
Guns in 2.1?
« on: September 15, 2006, 07:09:38 am »

Anybody had a chance to track down the problem with Guns in the 2.1 version yet? Something changed and there is a problem when you go to spawn a magazine.



Since I came a bit late to the 2.1 party I thought perhaps someone else has already figured this out.





A.T

(-)


<font size="4"><font face="Times New Roman"><font color="#000000">

The Ultimate Galaxy I<font size="3"><br />

Telnet 69.25.180.47:6666<font size="2"><br />

Status: Alpha, playtesters welcome

</font></font></font></font></font>


Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1022
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Guns in 2.1?
« Reply #1 on: September 15, 2006, 09:21:26 am »

I'm able to clone 9mm clips, both empty and loaded, as

well as a pre-loaded pistol. I'm also able to add clips as

inventory for containers, with no problems.



Which files specifically are failing? What errors do you get?



If it's a magazine object you coded, would you mind posting the code?



Thanks.



daelaskai

  • Guest
Guns in 2.1?
« Reply #2 on: September 15, 2006, 06:51:37 pm »

It seems to be a problem with the clips. Here is the error message from one I created a while ago:



> clone 44magclip



/realms/alexander/weapons/44magclip.c line 6: Undefined function ShowAmmo


   

---

*Error in loading object '/realms/alexander/weapons/44magclip'

Object: /cmds/creators/clone at line 21



'<function>' at /secure/save/creators/a/alexander (<function>) at /:0

'cmdAll' at /secure/save/creators/a/alexander (/lib/command.c) at line 93

'cmd' at /cmds/creators/clone at line 21

'CATCH' at /cmds/creators/clone at line 21

Trace written to /log/catch

Error in cloning object: *Error in loading object '/realms/alexander/weapons/44magclip'





#include <lib.h>

#include <vendor_types.h>

inherit "/lib/clip";



int CheckClip() {

write("" + ShowAmmo() + " rounds in clip.");

return 1;

}

void create(){

    ::create();

    SetKeyName("44magclip");

    SetId(({"clip","magazine"}));

    SetAdjectives(({"44mag","ammunition","ammo","44 cal magnum","clip"}));

    SetShort("44mag clip");

    SetLong("This is an extended combat magazine for an AutoMag pistol. "+

"\nIt can hold up to 32 rounds.\n");

    SetCaliber(44);

    SetMaxAmmo(32);

    SetAmmoType("acp");

    SetBaseCost("silver",20);

    SetVendorType(VT_TREASURE);

    SetInventory(([

"/realms/alexander/weapons/round44" : 32

      ]));

}

void init() {

::init();

add_action ("CheckClip", "check");

}





I guess ShowAmmo has been removed?





A.T

(-)


Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1022
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Guns in 2.1?
« Reply #3 on: September 15, 2006, 07:00:45 pm »

I wasn't able to find ShowAmmo() in the stock 2.0r25 lib.

I suspect it's something you guys added.



daelaskai

  • Guest
Guns in 2.1?
« Reply #4 on: September 15, 2006, 07:03:48 pm »

That could be, I worked on guns very early on and then left them for other things. Odd though because what originally triggered my really looking at them again was someone on the ds channel saying they could not get them to clone properly.



Ok, my bad, opps, sorry.



 



A.T

(-)


Offline darloth

  • Acquaintance
  • *
  • Posts: 0
    • View Profile
Guns in 2.1?
« Reply #5 on: October 06, 2006, 07:03:14 am »

9mm clips worked fine for me when I tried it, both the pistol and the ammo cloned (and fired) perfectly.



However, revolvers didn't work at all, claiming the lack of cylinder.c, which I couldn't find either, so I don't blame them.


Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1022
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Guns in 2.1?
« Reply #6 on: October 06, 2006, 07:20:19 am »

I'll see about finding that misplaced cylinder!



I suspect I pulled it because it interfered with a container

revamp I was doing at some point...then forgot to put it back.



Thanks for the bug report.