SphereCommunity
Can't resolve <SERV.CLIENT.0.ISONLINE> - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Can't resolve <SERV.CLIENT.0.ISONLINE> (/Thread-Can-t-resolve-SERV-CLIENT-0-ISONLINE)



Can't resolve <SERV.CLIENT.0.ISONLINE> - ograso - 06-29-2014 05:13 AM

Hey all,

I receive an error on console "Can't resolve <SERV.CLIENT.0.ISONLINE>"

How can I resolve this problem

FOR 0 <EVAL <SERV.CLIENTS>-1>
IF (<SERV.CLIENT.<dLOCAL._FOR>.ISONLINE>)
IF (!(STRCMPI(<SERV.CLIENT.<dLOCAL._FOR>.ACCOUNT.LASTIP>,<SERV.ACCOUNT.<ARGS>.LASTIP>)))
LOCAL.TOTALCONNECTED ++
ENDIF
IF (<LOCAL.TOTALCONNECTED> >= <LOCAL.TOTALALLOWED>)
SERV.LOG <ARGS> -> already logged with max number of accounts (<dLOCAL.TOTALALLOWED>)
RETURN 1
ENDIF
ENDIF
ENDFOR


RE: Can't resolve <SERV.CLIENT.0.ISONLINE> - Extreme - 06-29-2014 05:46 AM

IF <SERV.CLIENTS> > 0
FOR 0 <EVAL <SERV.CLIENTS>-1>
IF (<SERV.CLIENT.<dLOCAL._FOR>.ISONLINE>)
IF (!(STRCMPI(<SERV.CLIENT.<dLOCAL._FOR>.ACCOUNT.LASTIP>,<SERV.ACCOUNT.<ARGS>.LASTIP>)))
LOCAL.TOTALCONNECTED ++
ENDIF
IF (<LOCAL.TOTALCONNECTED> >= <LOCAL.TOTALALLOWED>)
SERV.LOG <ARGS> -> already logged with max number of accounts (<dLOCAL.TOTALALLOWED>)
RETURN 1
ENDIF
ENDIF
ENDFOR
ENDIF


RE: Can't resolve <SERV.CLIENT.0.ISONLINE> - ograso - 06-29-2014 05:51 AM

still same buddy


RE: Can't resolve <SERV.CLIENT.0.ISONLINE> - XuN - 06-29-2014 05:57 AM

IsOnline is a character's property, it will throw error if called when there's no character ( ie: not logged in ), remove it from the check.


RE: Can't resolve <SERV.CLIENT.0.ISONLINE> - ograso - 06-29-2014 06:02 AM

There is a character in server. Player or staff doesnt matter


RE: Can't resolve <SERV.CLIENT.0.ISONLINE> - Extreme - 06-29-2014 06:23 AM

IF <SERV.CLIENTS> > 0
FOR 0 <EVAL <SERV.CLIENTS>-1>
IF (!(STRCMPI(<SERV.CLIENT.<dLOCAL._FOR>.ACCOUNT.LASTIP>,<SERV.ACCOUNT.<ARGS>.LASTIP>)))
LOCAL.TOTALCONNECTED ++
ENDIF
IF (<LOCAL.TOTALCONNECTED> >= <LOCAL.TOTALALLOWED>)
SERV.LOG <ARGS> -> already logged with max number of accounts (<dLOCAL.TOTALALLOWED>)
RETURN 1
ENDIF
ENDFOR
ENDIF


RE: Can't resolve <SERV.CLIENT.0.ISONLINE> - Feeh - 06-29-2014 06:23 AM

IF (<SERV.CLIENT.<dLOCAL._FOR>>) without ISONLINE


RE: Can't resolve <SERV.CLIENT.0.ISONLINE> - ograso - 06-29-2014 06:26 AM

(06-29-2014 06:23 AM)Feeh Wrote:  IF (<SERV.CLIENT.<dLOCAL._FOR>>) without ISONLINE

working right now. does it problem If I use like that


RE: Can't resolve <SERV.CLIENT.0.ISONLINE> - Coruja - 06-29-2014 06:47 AM

you must check for (<SERV.CLIENT.<LOCAL._FOR>>) before call (<SERV.CLIENT.<LOCAL._FOR>.ISONLINE>)
Code:
IF (<SERV.CLIENT.<LOCAL._FOR>>)
  IF (<SERV.CLIENT.<LOCAL._FOR>.ISONLINE>)
    ...
  ENDIF
ENDIF
this will solve the problem, it will prevent the code run on clients stuck on login screen


RE: Can't resolve <SERV.CLIENT.0.ISONLINE> - ograso - 06-30-2014 03:05 AM

(06-29-2014 06:47 AM)Coruja Wrote:  you must check for (<SERV.CLIENT.<LOCAL._FOR>>) before call (<SERV.CLIENT.<LOCAL._FOR>.ISONLINE>)
Code:
IF (<SERV.CLIENT.<LOCAL._FOR>>)
  IF (<SERV.CLIENT.<LOCAL._FOR>.ISONLINE>)
    ...
  ENDIF
ENDIF
this will solve the problem, it will prevent the code run on clients stuck on login screen

working Perfectly. Thank you so much