PDA

View Full Version : Weapons Error [FIXED]


ChOJJa
12-30-2009, 18:03
I have done a clean installation of the server and the mod. I get the following error with version zombiereloaded-3.0-b2-patch-r546-r568 (http://forums.alliedmods.net/attachment.php?attachmentid=56121&d=1261880665)

L 12/30/2009 - 23:59:13: SourceMod error session started
L 12/30/2009 - 23:59:13: Info (map "de_dust2") (file "errors_20091230.log")
L 12/30/2009 - 23:59:13: [SM] Native "GetArraySize" reported: Invalid Handle 0 (error: 4)
L 12/30/2009 - 23:59:13: [SM] Displaying call stack trace for plugin "zombiereloaded.smx":
L 12/30/2009 - 23:59:13: [SM] [0] Line 473, src/zr/weapons/weapons.inc::WeaponsEntityToDisplay()
L 12/30/2009 - 23:59:13: [SM] [1] Line 650, src/zr/weapons/restrict.inc::RestrictCanUse()

Greyscale
12-30-2009, 18:29
Is that the only error?

rhelgeby
12-30-2009, 23:15
That's the same error I had once when our server acted weird. In addition I got these:

L 12/05/2009 - 14:26:20: [SM] Native "GetArraySize" reported: Invalid Handle 0 (error: 4)
L 12/05/2009 - 14:26:20: [SM] Displaying call stack trace for plugin "zombiereloaded.smx":
L 12/05/2009 - 14:26:20: [SM] [0] Line 440, src/zr/weapons/weapons.inc::WeaponsNameToIndex()
L 12/05/2009 - 14:26:20: [SM] [1] Line 766, src/zr/weapons/zmarket.inc::ZMarketEquip()
L 12/05/2009 - 14:26:20: [SM] [2] Line 1109, src/zr/weapons/zmarket.inc::ZMarketRebuy()
L 12/05/2009 - 14:26:20: [SM] [3] Line 187, src/zr/weapons/zmarket.inc::ZMarketOnClientSpawnPost()
L 12/05/2009 - 14:26:20: [SM] [4] Line 349, src/zr/weapons/weapons.inc::WeaponsOnClientSpawnPost()
L 12/05/2009 - 14:26:20: [SM] [5] Line 215, src/zr/event.inc::EventPlayerSpawnPost()

L 12/05/2009 - 14:32:07: [SM] Native "GetArraySize" reported: Invalid Handle 0 (error: 4)
L 12/05/2009 - 14:32:07: [SM] Displaying call stack trace for plugin "zombiereloaded.smx":
L 12/05/2009 - 14:32:07: [SM] [0] Line 440, src/zr/weapons/weapons.inc::WeaponsNameToIndex()
L 12/05/2009 - 14:32:07: [SM] [1] Line 766, src/zr/weapons/zmarket.inc::ZMarketEquip()
L 12/05/2009 - 14:32:07: [SM] [2] Line 1109, src/zr/weapons/zmarket.inc::ZMarketRebuy()
L 12/05/2009 - 14:32:07: [SM] [3] Line 187, src/zr/weapons/zmarket.inc::ZMarketOnClientSpawnPost()
L 12/05/2009 - 14:32:07: [SM] [4] Line 349, src/zr/weapons/weapons.inc::WeaponsOnClientSpawnPost()
L 12/05/2009 - 14:32:07: [SM] [5] Line 215, src/zr/event.inc::EventPlayerSpawnPost()

I saw them once on our server, but only once. Look at the stack trace. It might have something to do with cookies because ZMarketOnClientSpawnPost is called, and then ZMarketRebuy.

Greyscale
12-31-2009, 02:11
That error means that the weapons file isn't being loaded right. The handle it refers to (at least in the OP) is arrayWeapons which is the cache for all weapon data.

I'm stumped on this one.

ChOJJa
12-31-2009, 07:51
Is that the only error?

Yes, itīs the only error.

rhelgeby
12-31-2009, 09:32
http://helgeby.no-ip.org/zrdev/hg/hgwebdir.cgi/zr-dev/file/5f9547e16474/src/zr/weapons/weapons.inc

Line 200 and 230: Missing return, I guess?

What happens if weapons module is disabled? I've never tested that. :?

ChOJJa
12-31-2009, 12:01
Weapons Module is enabled.

zr_weapons 1, is it, i guess.

Greyscale
12-31-2009, 13:47
Not a lot of testing has been done but it should just disable all weapon related features like weapon restrictions, zmarket, etc but still work just enough for the gameplay to be correct. (Zombies don't get weapons, etc)

As for lines 200 and 230, I think line 200 should stay the same. The error just to let the host know that no weapons will be handled by the module (as if zr_weapons is 0). But 230 should probably be a fatal error and stop. I think line 191 as well needs to be fatal.

rhelgeby
01-08-2010, 10:30
This feature should be fixed in r578 or later (download latest patch).