View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002567SphereServerexecutable - windows buildpublic26-12-15 15:3327-12-15 02:15
Reporterxwerswoodx 
Assigned ToCoruja 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version16-06-2013, 0.56b Prerelease 
Target VersionFixed in Version 
Summary0002567: FINDCONT not working for weapons if there is any other item
DescriptionWhen I try to auto looting corpse it isn't working for weapons (maybe armors I didn't try). The problem is if there is any item FINDCONT not working for weapon.

[Function sharelootpack]
REF11=<ARGS>
for X 0 <eval <REF11.RESCOUNT> - 1>
  REF12=<REF11.FINDCONT.<DLOCAL.X>.UID>
  serv.log PACKID: <REF11> ITEMCOUNT: <REF11.RESCOUNT> FINDCONT: <DLOCAL.X> PACKNAME: <REF11.NAME> ITEMNAME: <REF12.NAME>
  if <REF12>
    shareloot <REF12>
  endif
endfor

This is the code and this is the output

Trying first time to loot:
14:31:(functions.scp,63)PACKID: 040004079 ITEMCOUNT: 3 FINDCONT: 0 PACKNAME: a corpse of Zorhgigoth ITEMNAME: gold coin
14:31:(functions.scp,63)PACKID: 040004079 ITEMCOUNT: 2 FINDCONT: 1 PACKNAME: a corpse of Zorhgigoth ITEMNAME: Upgrade Scroll
14:31:(functions.scp,63)PACKID: 040004079 ITEMCOUNT: 1 FINDCONT: 2 PACKNAME: a corpse of Zorhgigoth ITEMNAME: 0

You can see here 3rd item which is i_katana is "0"

This is the second time to try:
14:31:(functions.scp,63)PACKID: 040004079 ITEMCOUNT: 1 FINDCONT: 0 PACKNAME: a corpse of Zorhgigoth ITEMNAME: katana

Here you can see it shows katana's name.
TagsNo tags attached.
Nightly VersionAutomated (specify build number)
Experimental FlagsNone
Option FlagsNone
Internal Build Number
Attached Files

- Relationships

-  Notes
(0003001)
xwerswoodx (reporter)
26-12-15 16:06

I solved the problem, I though it was bug but it was only my mistake, sorry for spam, you can remove issue, sorry again.
(0003002)
Coruja (developer)
27-12-15 02:15

yep that's just your FOR order, you can't call FINDCONT.3 in an container that only have items 0/1/2

to avoid this you can just reverse your FOR using
FOR <eval <RESCOUNT>-1> 0
instead of
FOR 0 <eval <RESCOUNT>-1>

- Issue History
Date Modified Username Field Change
26-12-15 15:33 xwerswoodx New Issue
26-12-15 15:58 xwerswoodx Note Added: 0003000
26-12-15 16:03 xwerswoodx Note Deleted: 0003000
26-12-15 16:03 xwerswoodx Issue Monitored: xwerswoodx
26-12-15 16:06 xwerswoodx Note Added: 0003001
27-12-15 02:15 Coruja Note Added: 0003002
27-12-15 02:15 Coruja Status new => closed
27-12-15 02:15 Coruja Assigned To => Coruja
27-12-15 02:15 Coruja Resolution open => no change required


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker