ID:155047
 
mob/Login()
if(usr.key == "Gamemaster22"&& usr.key == "King-okal")
usr.verbs += typesof(/mob/Owner/verb/)
winshow("ap",1)

Problem:When i run the game it doesnt give me the window for the admin panel, Im trying to make no tabs but only one window specially for admins when login they have tabs for they're verbs.
You're using the incorrect operator.
The && operator is the binary of "and" so you're pretty much calling if(usr.key == "Gamemaster22" AND usr.key == "King-okal")

Instead, replace && with | so it's if(usr.key == "Gamemaster22" | usr.key == "King-okal")
In response to Kumorii
Actually, & is the binary version. He needs to use ||, not |.
In response to Robertbanks2
Robertbanks2 wrote:
Actually, & is the binary version. He needs to use ||, not |.

My bad. <//3
In response to Kumorii
Thank you but the window still doesnt show up at login
In response to GameMaster22
Change winshow("ap",1) to winshow(usr,"ap",1).
In response to Kumorii
Still no window popup at login, but if needed i can show you a screenshot of how it looks but , i dont have my map created yet so..
In response to GameMaster22
Hm..
Mind showing the code that you have right now?
In response to Kumorii
mob/Login()
if(usr.key == "Gamemaster22" || usr.key == "King-okal")
usr.verbs += typesof(/mob/Owner/verb/)
usr.verbs += typesof(/mob/Admin/Owner/verb)
usr.Owner=1
winshow(src,"ap",1)
if(usr.key == ""|| usr.key == "")
usr.verbs += typesof(/mob/GM/verb/)
winshow(src,"ap",1)
if(usr.key == ""|| usr.key == "")
usr.verbs += typesof(/mob/Admin/verb/)
winshow(src,"ap",1)
That is full code and i have the admin/owner verb cuz its for deleting reports and i put it to admin/owner instead of just owner
In response to GameMaster22
This should work.

mob
Login()
if(key == "GameMaster22" || key == "King-okal")
verbs += typesof(/mob/Owner/verb)
verbs += typesof(/mob/Admin/Owner/verb)
Owner = 1
winshow(src,"ap",1)
if(key == "" || key == "")
verbs += typesof(/mob/GM/verb)
winshow(src,"ap",1)
if(key == "" || key == "")
verbs += typesof(/mob/Admin/verb)
winshow(src,"ap",1)


You messed up your key. You had it checking for "Gamemaster22" when your key is "GameMaster22".

Aside from that, a good rule of thumb is to avoid using "usr" in procs unless it's needed(Click() for example).
In response to Kumorii
Ok thanks,
In response to Kumorii
winshow works? i thought it was .winset :o
In response to Shwb1
Shwb1 wrote:
winshow works? i thought it was .winset :o

winset() is called when you want to edit an interface at runtime. However, winshow() is used when you want to just open or close a window.
In response to Shwb1
I got another problem with my report bug thing
mob
Owner
verb
View_Reports()
var/html = {"<font size=3><b>Reports: </b></font size>
<hr>
<font color=black>
<font size=2>"}

if(length(Reports))
for(var/R in Reports)
html+="[R]<br><br>"
else
html+="<br><b>No Reports</b>"
usr<<browse(html,"window=who,size=550x600")
Delete_Report()
Reports = new()
fdel("savefiles/Reports.sav")

compiler says, proc definition not allowed inside another proc