[cubescript]numplayers = [
numpl = 0
loop npl 21 [
if (! (strcmp (findpn $npl) [])) [
// += numpl 1 // maybe += isn't in 1104?
numpl = (+ $numpl 1)
]
]
result $numpl
][/cubescript]
Might work, have not done anything like that in a while though, you'll have to test it.
Sometimes its better to know the highest valid client number though:
[cubescript]highestvalidcn = [
highestcn = -1
loop hvl 21 [
if (! (strcmp (findpn $hvl) [])) [
highestcn = $hvl
]
]
result $highestcn
][/cubescript]
numpl = 0
loop npl 21 [
if (! (strcmp (findpn $npl) [])) [
// += numpl 1 // maybe += isn't in 1104?
numpl = (+ $numpl 1)
]
]
result $numpl
][/cubescript]
Might work, have not done anything like that in a while though, you'll have to test it.
Sometimes its better to know the highest valid client number though:
[cubescript]highestvalidcn = [
highestcn = -1
loop hvl 21 [
if (! (strcmp (findpn $hvl) [])) [
highestcn = $hvl
]
]
result $highestcn
][/cubescript]