ID:143282
 

    icon = 'ED.dmi'
verb
Event()
if(usr.title=="GM")
if(events==0)
var/a = input("What is The event?","a",text)
events=1
reward = input("Put how much Gold up?","m",0)
if(usr.gold>=reward)
usr.gold-=(reward)
else
return
world<<"[usr] has started the event [a]."
var/X = input("Where is The event?","x",0)
var/Y = input("Where is The event?","y",0)
var/Z = input("Where is The event?","z",0)
else
usr.loc=locate((X),(Y),(Z))


Problem description:the gm is to set the area but when i defined X,Y,Z under the gm section it says GM.dm:116:error:X:undefined var
GM.dm:116:error:Y:undefined var
GM.dm:116:error:Z:undefined var
GM.dm:112:X :warning: variable defined but not used
GM.dm:113:Y :warning: variable defined but not used
GM.dm:114:Z :warning: variable defined but not used


The vars X, Y, and Z you defined up above where only the GM knows where it is.
In response to Kaiochao2536
I realized that and made it
turf/event_door
var/eventx
var/eventy
var/eventz
icon = 'ED.dmi'
verb
Event()
if(usr.title=="GM")
if(events==0)
var/a = input("What is The event?","a",text)
events=1
reward = input("Put how much Gold up?","m",0)
if(usr.gold>=reward)
usr.gold-=(reward)
else
return
var/X = input("Where is The event?","x",0)
var/Y = input("Where is The event?","y",0)
var/Z = input("Where is The event?","z",0)
world<<"[usr] has started the event [a]"
eventx=(X)
eventy=(Y)
eventz=(Z)
else
usr.loc=locate((eventx),(eventy),(eventz))
The variables are correct you can do it like that its werid ive never seen it either his code works fine for me.

mob/var
title = "GM"
events = 0
gold = 100
reward = 100
var/events
var/reward = 100
turf/event_door
var/eventx
var/eventy
var/eventz
icon = 'Mob.dmi'
verb
Event()
if(usr.title=="GM")
if(!events)
var/a = input("What is The event?","a",text)
events=1
reward = input("Put how much Gold up?","m",0)
if(usr.gold>=reward)
usr.gold-=(reward)
else
return
var/X = input("Where is The event?","x",0)
var/Y = input("Where is The event?","y",0)
var/Z = input("Where is The event?","z",0)
world<<"[usr] has started the event [a]"
eventx=(X)
eventy=(Y)
eventz=(Z)
usr.title = null
else
usr.loc=locate((eventx),(eventy),(eventz))


With making the title null you can easily test it.
If you know what (extra) parenthesis are used for (just the same as in math), it wouldn't make sense if it didn't work.

excuse the parenthesis pun thing.