SphereServer BugTracker - SphereServer
View Issue Details
0001903SphereServerexecutable - genericpublic28-01-11 23:1811-02-11 03:11
Coruja 
MrSugarCube 
normalminoralways
closedno change required 
 
 
Automated (specify build number)
None
None
0001903: Console error using SERV.CLIENT.x
If I use SERV.CLIENT.X and this client X is offline, the sphere return 'invalid command' and a console error 'cant resolve SERV.CLIENT.X.SOMETHING'

Many times I got this error because sphere returns 100 players online on SERV.CLIENTS, them I use

FOR 0 <eval <SERV.CLIENTS>-1>
 SERV.CLIENT.<LOCAL._FOR>.SAY lol
ENDFOR

and I got many console errors because client 30, 46, 78, etc is not successfully online (maybe on 'connecting' screen)
I dont know how to solve this. Probably return 0 or -1 if the char is offline can fix this
Using 28/01 sphere release
No tags attached.
Issue History
28-01-11 23:18CorujaNew Issue
29-01-11 01:25IncanusNote Added: 0000873
29-01-11 03:50MrSugarCubeSeveritymajor => minor
29-01-11 03:52MrSugarCubeStatusnew => closed
29-01-11 03:52MrSugarCubeAssigned To => MrSugarCube
29-01-11 03:52MrSugarCubeResolutionopen => no change required
29-01-11 05:26CorujaNote Added: 0000878
29-01-11 05:26CorujaStatusclosed => feedback
29-01-11 05:26CorujaResolutionno change required => reopened
29-01-11 05:29CorujaNote Edited: 0000878bug_revision_view_page.php?bugnote_id=0000878#r101
29-01-11 05:36MrSugarCubeNote Added: 0000879
11-02-11 03:11MrSugarCubeStatusfeedback => closed
11-02-11 03:11MrSugarCubeResolutionreopened => no change required

Notes
(0000873)
Incanus   
29-01-11 01:25   
From Sphere Wiki:
Note: The nth client may not be an ingame player character, <CLIENT.n> first as it returns 1 for ingame clients and 0 for non-player clients.
(0000878)
Coruja   
29-01-11 05:26   
(edited on: 29-01-11 05:29)
thats the problem, lol

.show serv.clients -> '80'
.show serv.client.50 -> '1'
.show serv.client.100 -> 'invalid command' (or 'cant resolve serv.client.100' if the function is called from some script)

EDIT: Btw, it works fine if X < serv.clients and return 0 if the char is not online
but if used X where X > serv.clients, the error occour

(0000879)
MrSugarCube   
29-01-11 05:36   
The example script you included in the description does not check <serv.client.<local._for>>.

If serv.clients returns 80, then serv.client.100 is out of range.. 0 to 79 are valid indexes.