ID:261571
![]() Jul 17 2002, 9:39 pm
|
|
I was wondering if there is a way to make a message that is only sent to a GM or Host.. thx
|
![]() Jul 17 2002, 9:45 pm
|
|
umm thx but im gettin an error maybe you can help out?
runtime error: Cannot read null.address proc name: MessageHost (/mob/verb/MessageHost) usr: \[Master GM] Shy_guy197 (/mob/NormalLink) src: \[Master GM] Shy_guy197 (/mob/NormalLink) call stack: \[Master GM] Shy_guy197 (/mob/NormalLink): MessageHost("jjjhjh") or maybe im just sending it to myself is a prob? |
Have you tried testing it with someone else? It's been ages since I've used the address var, let me run some tests.
|
This works in tests:
mob |
im still gettin an error...
runtime error: Cannot read null.address proc name: MessageHost (/mob/verb/MessageHost) usr: \[Master GM] Shy_guy197 (/mob/NormalLink) src: \[Master GM] Shy_guy197 (/mob/NormalLink) call stack: \[Master GM] Shy_guy197 (/mob/NormalLink): MessageHost("gtgg") and this is when another player sends me a message runtime error: Cannot read null.address proc name: MessageHost (/mob/verb/MessageHost) usr: Zaltron (/mob/NormalLink) src: Zaltron (/mob/NormalLink) call stack: Zaltron (/mob/NormalLink): MessageHost("yes") |
umm i dont know exactly what you mean but its what you just gave me...
mob verb MessageHost(T as text) for(var/mob/M in world) if(M.client.address) continue else if(!M.client.address || M.client.address == world.address) M << "Message to host from [usr]: [T]" usr << "Messaged host: [T]" |
Shy_guy197 wrote:
umm i dont know exactly what you mean but its what you just gave me... > mob Your indentation is messed up, move the if() and else if() over one tab to the right, and everything under them, too. |
mob
verb MessageHost(T as text) for(var/mob/M in world) if(M.client.address) continue else if(!M.client.address || M.client.address == world.address) M << "Message to host from [usr]: [T]" usr << "Messaged host: [T]" still got an error and the same one |
is there ne thing also like another .address you use?
to identify yourself? or where did you get the verb for it in one of the demos? or something? |
I don't really use demos, it was a code I typed up in 5 seconds, and it works fine on my system, I had my sister connect from her computer 300 miles away and it worked, I had my cousin connect, and it still worked.
|
well im not sayin its wrong.. yeah theres something wrong with the way in hosting because my other game worked with the code... ummmmmmmmmmmm
|
It must be a conflict with your current code setup, I'm not really willing to read more than 40 lines of code on the forum so posting the whole code really wouldn't help.
|
well i tested it on my game without a map works fine... i added a map it doesnt work get an error..... the same error
|