ID:141574
 
Code:
mob/proc
Update_Online()
winset(src, "Online", "cells=0x0")
src<<output("There are [Online] QChatters on.","Online")

mob/Login()
set background = 1
if(src.key in Admins)
src.verbs += typesof(/mob/Admin/verb)
world << "[Bot] : [src.key] has Joined Qubic Chat..."
src << "[Bot] : Welcome to Qubic Chat founded by Qubic."
Clients+=src
Online+=1
for(var/mob/M in world)
M.Update_Who()
M.Update_Online()
winset(client,"Namecolor","background=[namecolor]")
winset(client,"Textcolor","background=[textcolor]")
winset(client,"Namecolor","text=[namecolor]")
winset(client,"Textcolor","text=[textcolor]")
while(1)
AAfk()
..()


mob/Logout()
world << "[Bot] : [src.key] has Left Qubic Chat..."
Online-=1
Clients-=src
for(var/mob/M in world)
M.Update_Who()
M.Update_Online()
..()

var
Online = 0


Problem description:

Does not do anything when I run this code, it is supposed to show the amount of people on my game.
With no cells to output to, nothing will show up.
In response to Kaiochao
Kaiochao wrote:
With no cells to output to, nothing will show up.

Tried that, not it and also this worked for my other one so nope.
In response to Qubic
If you're trying to clear the grid, just output null to it.
Is your grid a flexible list of entries?
In response to Kaiochao
Yes it is.
winset(src, "Online", "cells=0x0")
src<<output("There are [Online] QChatters on.","Online")

There's the problem. The grid has a total of 0 cells so it won't display anything. Try 1x1. Also you didn't specify which cell to output to.

Try:

winset(src, "Online", "cells=1x1")
src<<output("There are [Online] QChatters on.","Online:1x1")
In response to Qubic
You should most likely use client/New and client/Del() if you're making a Chatting type game...
Try this:
proc
Update()
var/online = 0
for(var/client/C)
online ++
for(var/client/M)
winset(M,"Online","1x1")
M<<output("There are [Online] QChatters on.","Online:1x1")
client
New()
Update()
..()
Del()
Update()
..()
In response to Yash 69
None of those work >_>.
In response to Qubic
That's because everyone is using the wrong syntax.

Instead of the x, it should be a comma in output:
Ref << output("Hi","Hello:1,1")


(the skin reference mentions this format under Grids and Info, above Mouse actions and drop-zones)
In response to GhostAnime
GhostAnime wrote:
That's because everyone is using the wrong syntax.

Instead of the x, it should be a comma in output:

What 'x'?
In response to Qubic
Qubic wrote:
GhostAnime wrote:
That's because everyone is using the wrong syntax.

Instead of the x, it should be a comma in output:

What 'x'?

Online:1x1

That x.
In response to Haywire
Ok, That does not work either >_>.
In response to Qubic
Qubic wrote:
Ok, That does not work either >_>.

If you're trying to show people how many users are online, then use a label and do a count then set it's text param to it, why get dirty with grids?
In response to Haywire
Ah, that worked, Thanks.