ID:165015
Mar 10 2007, 4:28 am
|
|
mob/Login New() world << "[usr] Has logged in for the first time!!!" mob Login() world << "[usr] Has enterd the game!" mob Logout() world << "[usr] Has logged out!" My map selection screen does'nt appear and my screen is black... What's wrong? |
In response to DarkD3vil666
|
|
Yes but I have a map selection screen I need them to display it as well XD
|
In response to Jazzyfizzle
|
|
You can just change my coordinates to whatever you want. As I understand, you want it so when you login, the players can choose their map. You can just let them choose the map and the for example if the map is a forest, make them go to 45,67,1, if it's a canyon 21,56,3 and so on. Just change it to were you want them to appear.
|
In response to DarkD3vil666
|
|
Ummm...I dont want to send them there my game is a saw game (Based on the movie called saw) and there are several maps I want them to chose from I dont want to send them to a spacific location I want them to chose what they want =/
|
Dude, the relevant piece of code to share is your map selection screen, not your login messages.
We can only speculate what the problem is based on the above, because we don't see how you're calling the map selection upon login. My speculation: You're not putting a ..() in your mob/Login(), yet you've got another definition of login somewhere else that displays the map selection window. mob Login() world << "[usr] Has enterd the game!" ..() Basically ..() tells the proc to do whatever else you've told it to do elsewhere. Without it, it just prints that string and ends. Also, when you have code that doesn't work the way you want it to, and you're posting on the forums asking why it's not working and what not: Code Problems not Developer How-To. :) |
In response to Jazzyfizzle
|
|
If you read carefully, that's exactly what I told you. You want the players to choose from different maps with diferent activities in them right? So here would be something I would do...
mob |
In response to DarkD3vil666
|
|
Thx
|
In response to Jazzyfizzle
|
|
10$ says he just copy-pasted DarkD3vil666's code.
<small>This is getting old, but so is Jazzy's copying</small> |
In response to Kaioken
|
|
Dude I coded somthing myself and made a mistake is that so bad? lol I thought this was to help people not to make fun of people who mess up? Man get a life -_-
|
In response to Jazzyfizzle
|
|
I never regarded you messing up. I regarded you keeping on copying posted code. :)
|
In response to Kaioken
|
|
I had a problem with something and I needed help...
Belive it or not I look at the code and make sence of what I did wrong so I can become a better coder... I ask help so I can learn from my mistakes not for some idiot's to say I just copy paste and leave it... Thats how I learn and Im not changeing my style of learning So back off... |
In response to DarkD3vil666
|
|
DarkD3vil666 wrote:
If you read carefully, that's exactly what I told you. You want the players to choose from different maps with diferent activities in them right? So here would be something I would do... > mob You forgot the ..() in both Login() and Logout() |
In response to Pyro_dragons
|
|
I'm not fond with the ..(). What does it do exactly? I never use it and everything works just fine.
|
In response to DarkD3vil666
|
|
http://developer.byond.com/forum/ index.cgi?action=message_read&id=530497&forum=8&view=0
I already explained (poorly) there. The reference entry for .. does a better job of explaining it I think. :) You won't have problems if you don't use ..() as long as you don't have the same proc defined in multiple locations, or overwrite a built-in proc in a manner that essentially breaks it. Doing nothing more than outputting a string in a proc that normally logs players in without defining the rest of the Login proceedure, you need to call the parent. |
In response to Pyro_dragons
|
|
Get this straight - ..() isn't always needed. Perhaps you don't even know what it does either.
It is unneeded in Login() if you're setting the loc yourself (apparently client.statobj is set anyway regardless of calling ..() or not). It is unneeded in Logout() since it doesn't even have a default action. That is, to say, of course, if you don't have any parent overrides - but thats specifically project-wise and doesn't matter for random independent forum posted snippets. |
In response to DarkD3vil666
|
|
Read its reference entry. And use the forum search, people have explained this before (yes, I noticed Zagerus had on this topic, but he had done so quite basically and vaguely). Theres also info about it in the DM Guide, of course.
|
As for the mob/Logout(), your missing a del(src). Without this, even when people leave your game, their bodies will still be there.