SphereCommunity
#2252 Tooltip crash - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: #2252 Tooltip crash (/Thread-2252-Tooltip-crash)



#2252 Tooltip crash - Rizz - 04-25-2015 09:47 AM

I'm using an old way to make my tooltip with the color i want but now this code can crash the server in some circumstances with scroll:
for example .add i_scroll_bless and target the ground or .set color and target the scroll will crash the server...

This is the code:

PHP Code:
ON=@ITEMCLIENTTOOLTIP
VAR.TOOLTIP=  // <--- 889
OBJ=<ARGO.UID>
OBJ.TRIGGER @Tooltip
IF !<ISEMPTY <VAR.TOOLTIP>>
    
addcliloc 1042971,<VAR.TOOLTIP>
ENDIF
VAR.
TOOLTIP=


[FUNCTION 
ADD_TOOLTIP]
IF !<
ISEMPTY <VAR.TOOLTIP>> //621
VAR.TOOLTIP=<VAR.TOOLTIP><DEF.BR><DEF.BFONT_white><ARGS>
ELSE
VAR.
TOOLTIP=<DEF.BFONT_white><ARGS>
ENDIF

[
ITEMDEF 01f3d]
DEFNAME=i_scroll_bless
RESOURCES
=i_scroll_blanki_reag_garlic,i_reag_mandrake_root
SKILLMAKE
=INSCRIPTION 30.0MAGERY 20.0
TYPE
=T_SCROLL
WEIGHT
=1
//CIRCLE=3
CATEGORY=Provisions Alchemy Magic
SUBSECTION
=Scrolls 3rd Circle
DESCRIPTION
=Bless Scroll
VALUE
=29

ON
=@Tooltip
    tag0
.crafter
    
IF <eval STRLEN(<TAG.crafter_name>)> > 0
        ADD_TOOLTIP Crafter
: <TAG.crafter_name>



    
ADD_TOOLTIP Magic Rank: <LOCAL.mrank

[Image: error2_zpsuh6besxa.png]

[Image: error1_zpsxmpvvitb.png]

For now i found that this happens only with the scrolls...
Items such weapons are ok


RE: #2252 Tooltip crash - Rizz - 04-25-2015 07:52 PM

I found the problem, is related to LOCAL.something and morey under @tooltip in the item.

PHP Code:
ON=@TOOLTIP
LOCAL
.something=1    <--- this one is ok
LOCAL
.something=A    <--- leads to instant crash
LOCAL
.something="A"    <--- this one is ok

morey
=199    <----- leads to crash 

Fortunally, in my case, this is a redundance so i can delete without any problem (I'm talking about the morey).