SphereCommunity
fountain of life problem - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: fountain of life problem (/Thread-fountain-of-life-problem)



fountain of life problem - Satvet - 03-01-2018 11:35 AM

why does it show as (-)?
@Coruja could you help me with this?
if you do not see the pictures I can edit them again


item there is.
[Image: fountain_of_life_problem-1.png]

not item there is.
[Image: fountain_of_life_problem-2.png]


RE: fountain of life problem - slothere - 03-01-2018 08:29 PM

Probably a calculation problem. Check your syntax.


RE: fountain of life problem - Abuelox - 03-02-2018 01:58 AM

Its bandage negative weight? and trying it on other container?


RE: fountain of life problem - Coruja - 03-02-2018 03:06 AM

probably you're using an custom script to show this message, can you copy/paste this script line here?


RE: fountain of life problem - Satvet - 03-02-2018 05:30 AM

@slothere
yeah there is probably a calculation problem. I do not know where is it.

@Abuelox
there is no problem with the weight of bandage, other boxes give normal result.
[Image: fountain_of_life_problem-3.png]
[Image: fountain_of_life_problem-4.png]
[Image: fountain_of_life_problem-5.png]
[Image: fountain_of_life_problem-6.png]

@Coruja
yes I use a custom command but the problem is not related to it. you can look at the pictures above. the other boxes are problem free.
PHP Code:
ON=@ITEMCLICK
IF (<act.type> == t_container)
    IF (<
act.rescount> > 0)
    
act.message @95,,[<act.rescounteşya, <eval ((<act.weight> / 10) - <act.typedef.weight>)> kilo]
    RETURN 
1
      
else
    
act.message @85,,<act.name>    
    RETURN 
1    
    
ENDIF
ENDIF 



RE: fountain of life problem - slothere - 03-02-2018 06:01 AM

@satvet

You need to check that container's default weight value.

Create a new one and use ".xshow weight". Check what will say about that.


RE: fountain of life problem - Satvet - 03-02-2018 06:37 AM

Result for empty Fountain: 'weight' for 'Fountain of Life' is '10'
Result for empty Bag: 'weight' for 'bag' is '20'


RE: fountain of life problem - slothere - 03-02-2018 06:34 PM

Hmm.. I think what you want to do is what default msg doing. If you don't have any other purposes just edit the default msg if your kilo = stones.

//cont_items " (%d items, %d stones)"

you need to change this one in sphere_msgs.scp

After that add this one in a general event.

@itemclick
if (<act.type>==t_container) && (<act.rescount> < 1)
act.message <act.name>
return 1
endif