ID:262332
 
Code:
        proc
NewCharacterSetup()
var/A = input("What would you like to do this game?","Choice") as anything in list("Play","Watch")
switch(A)
if("Play")
var/Form/Newbie/frm = new()
var/mob/Player/P = new()
P.name = src.key
src.client.mob = P
frm.DisplayForm()
if("Watch")
var/mob/Watcher/W = new()
W.name = src.key
src.client.mob = W
else del(src)


Problem description:
Using Dantom's HTMLlib frm.DisplayForm() should display the newbie form. It does not do so. Do you know why?

-Ryan


Ryne Rekab wrote:
Problem description:
Using Dantom's HTMLlib frm.DisplayForm() should display the newbie form. It does not do so. Do you know why?

You're abusing usr. By default, Form/DisplayForm() takes usr as its argument.

If you want it to work, then call it like so:

if("Play")
var/Form/Newbie/frm = new()
var/mob/Player/P = new()
P.name = src.key
src.client.mob = P
frm.DisplayForm(P)
In response to Wizkidd0123
So I'm abusing usr? They are the ones that made it do that... I'm just following the tutorial that comes with it.

-Ryan
In response to Ryne Rekab
Why not just skip learning HTMLLib and use Topic() and raw HTML instead?
In response to CaptFalcon33035
Because the whole point of a lib is to make life easier and faster. Plug and play.

-Ryan