ID:162178
 
Applicable Configuration:
BYOND Version: 412.977
Operating System: windows xp
Web Browser: firefox
Game/Hub(s): http://www.byond.com/games/hub/Tcoo/NarutoUltimate2
Video Card (for graphics bugs): ATI

Descriptive Problem Summary: When you use the who verb it doesnt always correctly show the mobs right gender, for some it says neuter when they have it set to male

Numbered Steps to Reproduce Problem: use the who verb, doesnt always happen to be broke

Code Snippet (if applicable) to Reproduce Problem:
mob/verb/Who()
set name = "Who's online"
var/tmp/C = 0
for(var/mob/M in world)
if(M.client)
C += 1
if(!M.GM)
usr << "<b><font color=green>[M.name]<font color=#7cfc00>([M.key]) <font color=#d2691e>Gender:<font color=#ff8c00> [M.gender], <font color=#d2691e>Rank:<font color=#ff8c00> [M.rank], <font color=#d2691e>Home Village: <font color=#ff8c00>[M.Village], <font color=#d2691e>Clan:<font color=#ff8c00> [M.Clan]</FONT></font>"
if(M.Enforcer&&M.GM)
usr << "<font size=1><b><font color=yellow>[M.name]([M.key]) is a Enforcer <font color=#d2691e>Gender:<font color=#ff8c00> [M.gender], <font color=#d2691e>Rank:<font color=#ff8c00> [M.rank], <font color=#d2691e>Home Village: <font color=#ff8c00>[M.Village], <font color=#d2691e>Clan:<font color=#ff8c00> [M.Clan]</FONT></font>"
if(M.Moderator&&M.GM)
usr << "<font size=1><b><font color=yellow>[M.name]([M.key]) is a Moderator <font color=#d2691e>Gender:<font color=#ff8c00> [M.gender], <font color=#d2691e>Rank:<font color=#ff8c00> [M.rank], <font color=#d2691e>Home Village: <font color=#ff8c00>[M.Village], <font color=#d2691e>Clan:<font color=#ff8c00> [M.Clan]</FONT></font>"
if(M.Host&&M.GM)
usr << "<font size=1><b><font color=yellow>[M.name]([M.key]) is the Host <font color=#d2691e>Gender:<font color=#ff8c00> [M.gender], <font color=#d2691e>Rank:<font color=#ff8c00> [M.rank], <font color=#d2691e>Home Village: <font color=#ff8c00>[M.Village], <font color=#d2691e>Clan:<font color=#ff8c00> [M.Clan]</FONT></font>"
if(M.Administrator&&M.GM)
usr << "<font size=1><b><font color=yellow>[M.name]([M.key]) is a Administrator <font color=#d2691e>Gender:<font color=#ff8c00> [M.gender], <font color=#d2691e>Rank:<font color=#ff8c00> [M.rank], <font color=#d2691e>Home Village: <font color=#ff8c00>[M.Village], <font color=#d2691e>Clan:<font color=#ff8c00> [M.Clan]</FONT></font>"
if(M.LeadAdministrator&&M.GM)
usr << "<font size=1><b><font color=yellow>[M.name]([M.key]) is a Lead Administrator <font color=#d2691e>Gender:<font color=#ff8c00> [M.gender], <font color=#d2691e>Rank:<font color=#ff8c00> [M.rank], <font color=#d2691e>Home Village: <font color=#ff8c00>[M.Village], <font color=#d2691e>Clan:<font color=#ff8c00> [M.Clan]</FONT></font>"
if(M.Ownerz&&M.GM)
usr << "<font size=1><b><font color=yellow>[M.name]([M.key]) is he Owners <font color=#d2691e>Gender:<font color=#ff8c00> [M.gender], <font color=#d2691e>Rank:<font color=#ff8c00> [M.rank], <font color=#d2691e>Home Village: <font color=#ff8c00>[M.Village], <font color=#d2691e>Clan:<font color=#ff8c00> [M.Clan]</FONT></font>"
usr << "[C] Players Online!"
var/tmp/GameMod = 0
for(var/mob/M in world)
if(M.GM)
GameMod += 1
usr << "[GameMod] GM's Online!"


Does the problem occur:
Every time? Or how often? havent noticed in a while
In other games?idk
On other computers?idk
In other user accounts?idk

When does the problem NOT occur?idk

Workarounds:none

Maybe they did set it to neuter?
In response to Kaiochao
Kaiochao wrote:
Maybe they did set it to neuter?
no they didnt
M.client.gender
In response to Xero-EP
Xero-EP wrote:
M.client.gender
umm how is that any different
In response to Tcoo
In this case, M.gender will refer to the mob's gender, not the client's gender.
This is not a BYOND bug, this is a mistake that you made. A newly-created mob does not magically get assigned whatever gender you are thinking of at the moment. The gender of the mob is neuter because you never set it to anything else.
In response to Garthor
Garthor wrote:
This is not a BYOND bug, this is a mistake that you made. A newly-created mob does not magically get assigned whatever gender you are thinking of at the moment. The gender of the mob is neuter because you never set it to anything else.
for 1 this is a byond bug sense byond has this built in as a variable, 2 sense it is a built in variable you can pick your gender when you start off and when someone picks a male or female and not neuter it should come up w/e they pick
In response to Tcoo
I was considering moving this thread because I was pretty sure this was not a BYOND bug, but this clinches it.

Garthor is quite right. The mob doesn't have the gender you're expecting because you never set it. Normally client/New() or mob/Login() will set the new mob's gender, but if you override those you risk changing that. The fact that the var is built in doesn't have any bearing on whether this is a bug.

From what you're saying it sounds like you have a character creation routine that includes a gender choice. That routine, then, would be the most likely culprit.

Lummox JR
In response to Popisfizzy
Popisfizzy wrote:
In this case, M.gender will refer to the mob's gender, not the client's gender.
so ya saying if i did M.cliet.gender it would make a difference when i did M.gender it worked fine so i dont see how it would make a difference
In response to Lummox JR
Lummox JR wrote:
Normally client/New() or mob/Login() will set the new mob's gender

Specifically, the mob created by default in client/New() will have the same gender as the client. mob/Login() doesn't do anything along these lines.
In response to Tcoo
M.client.gender is certain to get the player's gender. M.gender will only get the mob's gender.
In response to Tcoo
I had this same bug! Some people were coming up neuter instead of male or female. Turns out, there was a bug with setting the mobs gender based on which icon they chose (ie my own fault). Somewhere you arent setting the gender right, or the proc is crashing out before it gets to set the gender, or their client is set to neuter. double check where you are setting their gender and that it isnt crashing the proc before that, and dont set it to their client imho
In response to Garthor
Ah, I knew it was one of those; I couldn't remember which. But that makes the most sense by far.

It seems like what's happening for Tcoo is that he's creating a mob on his own, and forgetting to set the gender because he assumes it's being done for him. That's a really easy thing to overlook, so no surprise it caused some confusion. Character creation systems are full of little gotchas like that.

Lummox JR
In response to Popisfizzy
I'm guessing M.client.gender isn't really what he wants, though. It sounds like he wants to be able to set the mob's gender based on what the user chooses; he just isn't setting it correctly.

Lummox JR
In response to Lummox JR
Ah, alright, I see now.