ID:2426842
 
Code:
    verb
Say(msg as text) //Chat with those in view.
if(msg == "") //If the message is empty...
return // Do nothing
if(usr.name == "")//If the player doesn't have a name.
usr << "You have no name. Please restart the game. The game will not save."//Notify the player.
return //don't send a message.
view() << "<b>[usr]:</b> [msg]" //The message told to view.
World(msg as text)
if(msg == "")
return
if(usr.name == "")
return
if(admin == 1)
world << "<b><font color=red>[usr]:</font> [msg]</b>"
else
world << "<b><font color=blue>[usr]:</font> [msg]</b>"
Change_Name(n as text)
if(n == "")
usr << "No, that just won't do. Returning to your original name."
return
usr.name = n


Problem description:

This is absolutely puzzling to me. Whenever World chat or Say chat is used for the first time on the client, the username isn't in bold. It's fixed afterward, so it's really only a minor bug. But still, I have no idea why this is happening.

Images: https://imgur.com/a/wQ06P5g

Edit: I just copied that code into a blank new project, to see if it was something else in my project interfering.

Aside from the little bit it starts with (about tile size and all) and adding the admin variable so it compiled properly, it was a completely blank project. And yet... still the same bug.

I feel like I'm missing something extremely simple here.

Edit 2: I was wrong about the problem. It's not that the bold wasn't working so much as the text would suddenly get bigger after the first chat message. Here is a more extensive test.

https://i.imgur.com/hrHlueS.png
Omitting your problem, i find some not good practics in your code.
Take a look.
var/list/players // list of players in the world
mob
Login()
players+=src// add player to players list
Logout()
players-=src// remove player from players list
verb
setName(n as text)
if(n) src.name=n // if n is not null set name
Say(msg as text)
if(msg && name) view() << msg// the same, if msg and player name are not null
World(msg as text)
if(!msg || !name) return// return if msg or name is null
var/clr="black"//default font color
if(admin) clr="red"//if we are admin set font color to red
players << "<b><font color=[clr]>[msg]"//send message to mobs in player list instead a whole world.
Alright. Admittedly I'm pretty new to this.

Thank you for this. I've changed the code in my test box to match that, edited to fit the formatting I need. Yeah, sadly I still have no bold on the first message, but I understand wasn't the point of your reply anyway.

var/list/admin // list of admins
var/list/players // list of players in the world

mob
Login()
players+=src// add player to players list
Logout()
players-=src// remove player from players list
verb
setName(n as text)
if(n) src.name=n // if n is not null set name
Say(msg as text)
if(msg && name) view() << "<b>[src]:</b> [msg]"// the same, if msg and player name are not null
World(msg as text)
if(!msg || !name) return// return if msg or name is null
var/clr="blue"//default font color
if(admin) clr="red"//if we are admin set font color to red
players << "<b><font color=[clr]>[src]:</font color> [msg]"//send message to mobs in player list instead a whole world.


I hope someone can help me with that.

I was wrong about the problem. It's not that the bold wasn't working so much as the text would suddenly get bigger after the first chat message. Here is a more extensive test.

https://i.imgur.com/hrHlueS.png

OP changed to better reflect the issue.
In response to OroCrimson
I just tried your code in a new project environment, and I'm unable to reproduce the issue. I'm currently using version 512.1463.

What version of BYOND are you running?
Same version.

Here's my whole environment for the test box, if it might help in diagnosing it. But it's really just the single short dm tbh.

https://bit.ly/2UTARbl

Edit: Turns out this is a personal bug. I had a friend test it out with the same environments, and no bug. Had him log in as me, to see if it was something weird about my Key. Still no bug.

So it's just my PC. I don't quite understand it. Here's to hoping the increased text size bug doesn't actually effect the game when I play with others.

Now I kinda even more want to know how to fix it, but I think we've now established this isn't a developer bug.

Edit 2: We tested it online. Turns out I have this bug when *any* player sends a message, not just myself. Also noticed a slight issue in which my friend wasn't added to "players", and therefore couldn't see any world chat messages (despite being able to send them just fine.) Is this because they were a guest user? That doesn't make much sense either way.

Edit 3: Just tried uninstalling BYOND AND deleting the Documents folder (couldn't find any folders for BYOND in AppData) and reinstalled it. Still didn't fix the bug. :(

This now seems like a BYOND Help problem, but it's also so specific that I don't know if it applies with other projects or not.

Edit 4: It does not appear to affect other projects, but they're all so heavily skinned that I don't really know how that works.
Have you tried turning on/off hardware rendering or whatever that option is called?
In response to A.T.H.K
I'm sorry, I don't follow.
In response to OroCrimson
In the BYOND Pager, click on the little cog in the top right, select Preferences, go to the Games tab, and untick the box that says "Use graphics hardware for displaying maps" and then try running your game again to see if the issue persists.
In response to Legobumb
Legobumb wrote:
In the BYOND Pager, click on the little cog in the top right, select Preferences, go to the Games tab, and untick the box that says "Use graphics hardware for displaying maps" and then try running your game again to see if the issue persists.

Thank you for the clarification.

I have now done this, but the problem still persists. :(

Login to reply.