ID:142238
 
Code:
mob
Stat()
if(src == usr) statpanel("Items; [weight]/50",src.contents)


Problem description:

I figure that's the only relevant piece of code.

I added the character's weight into the statpanel's name for convenience; they can see what their weight is at without having to look in any specific statpanel. However, every time it updates(an object enters or leaves the inventory), it moves me out of the inventory panel and into a different statpanel.

Is there any way around this?

mob
Stat()
if(statpanel("Items; [weight]/50"))
stat(src.contents)


I'm not sure, try that.
In response to Andre-g1
Andre-g1 wrote:
> mob
> Stat()
> if(statpanel("Items; [weight]/50"))
> stat(src.contents)
>

I'm not sure, try that.

It still switches out. :(
In response to Zaole
Maybe because it updates.. This looks like a bug or some glitch.

=/ It shouldn't switch out, in my opinion.
You're using a statpanel thats name is constantly changing it into a diferent statpanel, so of course it switches out when the statpanel you were looking at no longer exists.
mob
Stat()
statpanel("Items")
stat("[weight]/50")
stat(src.contents)
Solution: Don't make the statpanel's name ever change.
There are other ways to show a var that the player can always see, such as with interfaces or with client.screen. However, if switching out of the statpanel is the problem, then I don't see why you wouldn't just show the weight within the Items statpanel.
In response to Naokohiro
It would still be a nice and simple addition to make.
In response to Naokohiro
Naokohiro wrote:
I don't see why you wouldn't just show the weight within the Items statpanel.

As I said in my previous post, it's for convenience. If I showed the weight on the character's screen instead, it would further limit how much they can see on their screen. I'd rather just stick it somewhere with unused space that the player is looking at a lot.
In response to Zaole
Zaole wrote:
As I said in my previous post, it's for convenience. If I showed the weight on the character's screen instead, it would further limit how much they can see on their screen. I'd rather just stick it somewhere with unused space that the player is looking at a lot.

First of all, don't quote only part of my sentence when the rest of it is completely relevant.
Secondly, you can add objects to the screen outside of the map view (border objects, etc.) and you could also accomplish it by adding to the interface (skin) like I said.
In response to Naokohiro
Naokohiro wrote:
Zaole wrote:
As I said in my previous post, it's for convenience. If I showed the weight on the character's screen instead, it would further limit how much they can see on their screen. I'd rather just stick it somewhere with unused space that the player is looking at a lot.

First of all, don't quote only part of my sentence when the rest of it is completely relevant.

It's not like I'm pretending that you didn't say the other part. :| I just didn't quote that part because I was only responding to that piece.

Secondly, you can add objects to the screen outside of the map view (border objects, etc.) and you could also accomplish it by adding to the interface (skin) like I said.

How? I'm interested in both.
In response to Zaole
Read up on the screen_loc var.
Secondly, learn to make skins, I believe this particular thing would deal with labels.