ID:146506
 
Code:
Logout()    
..()
del(src)


Problem description:

BYOND(341.877) BUG: bad ref (6:1936) in DecRefCount(DM Character_Handling.dm:32)


I have no idea what is causing this. Please post if you know. Thanks

-Travis(Niran)
Well, I'm not completely sure, but maybe you should try
Logout()
del(src)
..()

Anyway, I'm not sure if that will fix the problem or not, but you're supposed to use the ..() proc at the end of the code, so maybe thats it.
In response to Jamesburrow
Actually, I am pretty sure the default of Logout() is client/del(). I'll check that real fast.

Edit: Nevermind, it is the opposite >.>
In response to N1ghtW1ng
Code:
Client/Del()
if(istype(src.mob, /mob/CharacterHandling/Choose))
return ..()
if(src.mob)
src.SaveMob()
return ..()
if (!crban_isbanned(src))
world << "<font color = red>System: [src] has logged out of the game.</font>"
.=..()

Logout()
..()
del(src)


Problem:
BYOND(341.877) BUG: bad ref (6:1936) in DecRefCount(DM Character_Handling.dm:32)

This is the Client/Del() if this helps solve the issue...

-Travis(Niran)
In response to Niran
Never never never put a space between an HTML attribute and the value. That should be color=red, not color = red.

Lummox JR
In response to Jamesburrow
Jamesburrow wrote:
Well, I'm not completely sure, but maybe you should try
> Logout()
> del(src)
> ..()
>


After del(src) is called, the proc will come to a screeching halt and ..() will not be called. Hence, this is one of the most bogus suggestions ever.

It's great that you want to help, but if you have no idea what you're doing, you have no help to offer. Taking random stabs at it won't do a thing except confuse the issue.

Lummox JR
Which of those lines is actually causing that bug?

I don't quite see what would cause that in that particular snippet, since that reference is for a string. My first suspect in these matters is any code pertaining to savefiles.

Lummox JR
In response to Niran
show us line: 32
the problem is in there.

O-matic
In response to Lummox JR
Line 32 is the Logout()... Which is why I can't seem to find the problem...
In response to Niran
mob
Logout()
..()
del(src)


You forgot to put mob in lol

O-matic
In response to O-matic
... i had the mob for Login() above though not that newbie of a coder O. =D

-Travis(Niran)
In response to Niran
Niran wrote:
... i had the mob for Login() above though not that newbie of a coder O. =D

HaH I know that lol but even the best coders make mistakes sometimes.

hmm.. perhaps putting client instead of mob. I''m not sure if its gonna make any change but..
who knows...


EDIT * WoopS I didnt know that u are ssjgoku321.. I just found out O.o . *

O-matic