#include <deadron/characterhandling>
#include <dantom/htmllib>
mob/BaseCamp/FirstTimePlayer
FirstTimePlayer()
alert("Welcome to BYOND Life version 1.0")
alert("Please wait while we transfer you to your home. This will be the hotel until:","A. You subscribe for $3 or","B. You buy a house for $2,000,000 in game dollars.")
if(!subscribe)
houseloc="2,2,2"
else
alert("")
return 1
mob
Login()
..()
usr.loc=locate(houseloc)
Logout()
..()
Problem description:
OK. I have looked through the forums a few times, and it gave me some suggestions, but none of them would fix it. For some reason I keep coming up with a black screen no matter what I do.
The other problem: You just created a prime example of usr abuse in both mob/Login(), and FirstTimePlayer(). You see, usr is basically a variable which is equal to the last mob to do something. When you press a hyperlink, you become Topic()'s usr, when you press a verb, you become that verb's usr, when you Click(), then you, the clicker, are the usr of Click(). usr is not a global variable. It only works right in certain situations because it isn't a global variable. If player A presses attack() at the same time as player B, then player A's attack()'s usr is equal to player A, while player B's attack()'s usr is equal to player B.
usr is passed down through the call stack (the area of memory where arguments are passed through) from function to function, so if, from attack(), I call src.Death(), then Death()'s usr variable will be equal to the player who attack()ed.
You'll find that excepting certain instances (usr is commonly needed in client/Topic(), for example, because the src value of Topic() can actually be manually defined by the developer), and also excepting certain functions, such as, for example, Click(), DblClick(), and Stat(), it's unsafe to use usr in procs. That's because when a function is called manually, and not by the player, then the usr variable of that function will not necessarily be equal to the player you want it to be equal to. To solve this problem, use src instead unless you specifically know that you mean usr.
Remember, usr is the default argument for certain verbs such as input(), alert(), view), oview(), range(), and orange(). That's why your FirstTimePlayer() includes usr abuse: usr is the default argument for alert().
One more thing: If the BaseCamp library has anything written for FirstTimePlayer(), then you might want to call ..() for your FirstTimePlayer() if you don't want to override BaseCamp's. Of course, I'm not sure that it does include anything to be overwritten, so you'll have to find out for yourself.