The limb data I'm looking for is all of the stuff about my entities that I place in 3DWS... this is a bit of the code I used in my DBPro project. It looks through all of the limbs, then does things depending on what they are.
if limb exist (worldnum,n)
properties$=limb name$(worldnum,n)
objecttype$=lower$(KeyValue$(properties$,"objecttype",""))
classname$=lower$(KeyValue$(properties$,"classname",""))
select objecttype$
case "entity"
ex# = limb position x(worldnum,n)
ey# = limb position y(worldnum,n)
ez# = limb position z(worldnum,n)
select classname$
case "badguy"
badguyhp = val(KeyValue$(properties$,"hp",""))
etc, etc...
These are the functions being used by that, I have no idea what they are doing though so I have no idea how to translate it into C++
function Replace2$(s$,c$,nc$)
for n=1 to len(s$)
tc$=mid$(s$,n)
if tc$=c$
tc$=nc$
endif
ns$=ns$+tc$
next
endfunction ns$
function Piece$(s$,entry,char$)
`If entry<1
` exitfunction ""
` EndIf
`If Trim(char$)=""
` While Instr2$(s$,char$+char$)>0
` s$=ReplaceString$(s$,char$+char$,char$)
` endwhile
` EndIf
For n=1 To entry-1
p=Instr2(s$,char$)
If p
s$=Right$(s$,Len(s$)-p)
Else
exitfunction ""
EndIf
Next
p=Instr2(s$,char$)
If p<1
`s$=Trim(s$)
Else
s$=Left$(s$,p-1)
EndIf
endfunction s$
`function Trim$(s$)
`endfunction
function KeyValue$(properties$,findname$,defaultvalue$)
findname$=lower$(findname$)
repeat
p=Instr2(properties$,chr$(13)+chr$(10))
if p>0
keypair$=left$(properties$,p-1)
properties$=right$(properties$,len(properties$)-p-1)
else
keypair$=properties$
properties$=""
endif
p=Instr2(keypair$,"=")
if p=0
exitfunction ""
else
name$=left$(keypair$,p-1)
value$=right$(keypair$,len(keypair$)-p)
if lower$(name$)=findname$ then exitfunction value$
endif
until properties$=""
endfunction defaultvalue$
function Instr2(searchstring$,findstring$)
l1=len(searchstring$)
l2=len(findstring$)
dl=l1-l2
if dl<l then exitfunction 0
for n=0 to dl
endp=n+l2
s$=right$(searchstring$,l1-n)
s$=left$(s$,endp-n)
if s$=findstring$ then exitfunction n+1
next n
endfunction 0