ID:139470
 
Code:
mob/var
headset = 0
frequency = 1

mob
proc
HeadSet(mob/M in world,msg as text)
if(M == src)
return
if(M.headset==1&&src.headset==1&&M.frequency==src.frequency)
M << "[src] says: [msg]"




mob/verb/Say(msg as text)
view() <<"[usr] says: \"[msg]\""
call(/mob/proc/HeadSet)(usr,msg)

obj
Radio//defines the object sword
icon = 'headset.dmi' //defines which icon file to go to
verb
Activate()
if(usr.headset == 0)
usr << "You turn on your headset radio."
usr.headset = 1
else
usr << "You turn your headset radio off."
usr.headset = 0
Change_Frequency()
if(usr.headset == 1)
var/head = input("What frequency?","Current Frequency: [usr.frequency]") as num
usr.frequency = head
else
usr << "Turn your headset radio on first."
return


Problem description:
runtime error: Cannot read null.headset
proc name: HeadSet (/mob/verb/HeadSet)
usr: Situs67 (/mob)
src: null
call stack:
HeadSet(Situs67 (/mob), "final test...")
Situs67 (/mob): Say("final test...")

The Idea is to make like...a radio that can be used to communicate with everyone that has a radio and has it turned onto the same frequency using the normal Say verb.
Situs67 wrote:
Code:
> mob/var
> headset = 0
> frequency = 1
>
> mob
> proc
> HeadSet(mob/M in world,msg as text)
> if(M == src)
> return
> if(M.headset==1&&src.headset==1&&M.frequency==src.frequency)
> M << "[src] says: [msg]"
>
>
>
>
> mob/verb/Say(msg as text)
> view() <<"[usr] says: \"[msg]\""
> call(/mob/proc/HeadSet)(usr,msg)
>
> obj
> Radio//defines the object sword
> icon = 'headset.dmi' //defines which icon file to go to
> verb
> Activate()
> if(usr.headset == 0)
> usr << "You turn on your headset radio."
> usr.headset = 1
> else
> usr << "You turn your headset radio off."
> usr.headset = 0
> Change_Frequency()
> if(usr.headset == 1)
> var/head = input("What frequency?","Current Frequency: [usr.frequency]") as num
> usr.frequency = head
> else
> usr << "Turn your headset radio on first."
> return
>

Problem description:
runtime error: Cannot read null.headset
proc name: HeadSet (/mob/verb/HeadSet)
usr: Situs67 (/mob)
src: null
call stack:
HeadSet(Situs67 (/mob), "final test...")
Situs67 (/mob): Say("final test...")

The Idea is to make like...a radio that can be used to communicate with everyone that has a radio and has it turned onto the same frequency using the normal Say verb

You're using call() wrong. Instead do a for loop of mobs in the world who have the same frequency as yours and display the message to them.
In response to Kalzar
Alright. How should the code look?