ID:171089
 
How would I make it so when two people are in two different area's one of them gets a certain verb and then can activate it. This checks to see someone is in the other box and then asks them to start...I tried doing it but got an error...

area/Westside
Entered(mob/A)
verbs += /mob/player/verb/DuelStart


area/Eastside
mob
player
proc
Duel1(mob/A,mob/B)
if(!Dueling)
if(A in (/area/Westside))
if(B in (/area/Eastside))
Dueling = 1
A.verbs-= /mob/player/verb/DuelStart
B.verbs-= /mob/player/verb/DuelStart
Screen()
Screen()
Draw(A)
Draw(A)
Draw(A)
Draw(A)
Draw(A)
Draw(B)
Draw(B)
Draw(B)
Draw(B)
Draw(B)
RPS(A,B)
verb
DuelStart(mob/A,mob/B)
alert("Do you wish to start a duel?","Duel Start","Yes","No")
Duel1(A,B)//This line


This is the runtime I don't really understand it since Duel1 is not an /area/Westside verb:
runtime error: undefined proc or verb /area/Westside/Duel1().

proc name: DuelStart (/mob/player/verb/DuelStart)
  source file: Main.dm,76
  usr: Adas (/mob/player)
  src: Westside (/area/Westside)
  call stack:
Westside (/area/Westside): DuelStart(Adas (/mob/player), the blah (/mob/player))


Also for some reason when I click DuelStart when I am in /area/Westside it gives me an input of everyone in the world...twice. Thanks alot.
What line is line 76?
In response to Hell Ramen
Heh...I knew I forgot something...I edited my original post.
Ok, first, I'll address the double listing of everyone in the world when you click on the DuelStart verb. You taking two parameters from the verb which are both mobs. If these aren't supplied, dreamseeker will ask the user who they want to use as the parameters that are being passed in. My suggestion to get around this would be to make the verb NOT take parameters, and instead just call a proc, passing in the usr and whoever it finds in the Eastside area (or just pass in the usr, and let the proc handle who is picked from the Eastside, either way would accomplish what you're wanting to do). As for the error, it seems as if your game is looking for Duel1() under the /area/Westside root. The easiest way to get around this would be to call it using A.Duel1(A,B). I'm honestly not sure why it would be listed under /area/Westside, since according to what you have pasted in here, it's clearly part of /mob/player. Hrm.

[edit]

God, I'm blind. Figured it out right after posting. In your Entered() proc, you're adding that verb to the area. Add it to A.verbs, instead. Sorry.
In response to Igmolicious
Alright a few problems. Onething is I tried puting: A.Duel1(A,B) like you said, but it is undefined. Another thing is when I make it A.verbs += /mob/player/verb/DuelStart, it makes it any turf you get the verb. Thanks for trying to help though. Any other suggestions would be greatful.
In response to N1ghtW1ng
To deal with the undefined error (A.Duel1(A,B)), you'll need to either pass in A as type /mob/player/A (since A is just of the /mob type, and Duel1 is part of the /mob/player type), or use A:Duel1(A,B); I'd suggest the first option, but heck, if you really didn't mind, you could probably just move the Duel1() proc to the mob root, and not have to modify DuelStart() at all. As for the second error, I'm not sure what you mean. Can you explain it a little more in-depth?