ID:178994
 
When I compile s_admin I get this message:

loading s_admin.dme
s_admin2.dm:238:error: var: expected end of statement
s_admin2.dm:239:error: GM_edit: expected end of statement
s_admin2.dm:239:error: set: expected end of statement
s_admin2.dm:239:error: set: expected end of statement
s_admin2.dm:239:error: var: expected end of statement
s_admin2.dm:239:error: var: expected end of statement
s_admin2.dm:239:error: html: expected end of statement
s_admin2.dm:239:error: html: expected end of statement
s_admin2.dm:239:error: html: expected end of statement
s_admin2.dm:239:error: html: expected end of statement
s_admin2.dm:239:error: html: expected end of statement
s_admin2.dm:239:error: html: expected end of statement
s_admin2.dm:239:error: html: expected end of statement
s_admin2.dm:239:error: for: expected end of statement
s_admin2.dm:242:error: Announcement: expected end of statement
s_admin2.dm:244:warning: /: value changed

s_admin2.dm:244:error: ________________________________: expected end of statement
s_admin2.dm:244:error: announced: expected end of statement
s_admin2.dm:244:error: unexpected symbol: ,

s_admin.dmb - 18 errors, 1 warning (double-click on an error to jump to it)

Can anyone help me with this?
That happens when your code is missing an ). It's not s_admin it's your code.
In response to Nadrew
k
In response to Jap
Where?
In response to Jap
This is what I have:

/*********************************************
Spuzzum's Administrative Library v2.2
by Jeremy "Spuzzum" Gibson
**********************************************

Refer to the included s_admin-2.0.html for more information
on how to get this library up and running for your world.

Copyright ©2000-2001 Jeremy "Spuzzum" Gibson. Refer to
s_admin-2.0.html for more copyright information.

*********************************************/
//GM PREFIXES AND SUFFIXES

// This is added to the beginning of a GM's name.
// For your convenience, you can set a different
// prefix for the Master GM rather than Admin or
// regular GMs.
//
// If you dislike having the prefix, it can be
// disabled by setting it to 'null'
// Eg. var/const/MASTER_GM_PREFIX = null

var/const/MASTER_GM_PREFIX = "\[Master GM] "
var/const/ADMIN_GM_PREFIX = "\[Admin GM] "
var/const/GM_PREFIX = "\[GM] "


// The suffix works like the prefix, but it is
// added to the end of the name rather than the
// beginning.
// For your convenience, you can set a different
// suffix for the Master GM rather than Admin or
// regular GMs.
// By default, these are disabled (see above).

var/const/MASTER_GM_SUFFIX = null
var/const/ADMIN_GM_SUFFIX = null
var/const/GM_SUFFIX = null


/********************************************/
//!!! [MASTER KEY] !!!

// The master key determines who the master GM is.
// The person with the master GM key gains verbs
// that allow him or her to add, remove, and modify
// GMs in addition to the standard functions.
//
// The master GM should usually be the person who
// made the world itself, though it doesn't have to
// be.
var/const/MASTER_KEY = "o0AlienMan0o" //(change my key to yours!)


/********************************************/
//INACTIVITY BOOTER

// The inactivity setting will occasionally check a player's
// client to see how long it has been inactive. If so, it
// will Logout() the player.
// Times are in seconds. If you don't want this to happen,
// set this equal to zero.
//allow 15 mins. (900 seconds) of AFK

// Note that this is not an exacting figure; the proc that checks clients
// loops itself very, very slowly to prevent lag. They are guaranteed at LEAST
// that amount of time.

/********************************************/
//GM_EDIT SETTINGS

// Though it is a perceivable security risk, if you wish you can allow
// non-master GM types to edit themselves. This feature was partially
// disabled due to both foresight and an error in the code.
// If you wish to allow them to edit themselves, set this to 1.
var/const/ALLOW_GM_SELF_EDIT = 0

/********************************************/

// These are initialised later, so no need to initialize yet.
var/list/GMs
var/list/Admins

// This is initialised later too. It contains a list of all keys that aren't allowed.
var/list/banned



world
New()
..() //do any other user-provided things first
world.log << "Instance opened at approx. [ReportDate(world.realtime)]."



if(isnull(banned)) //if first time starting
banned = new /list //initialise the list


if(isnull(GMs)) //if this is the first time starting up
GMs = new /list //initialise.

if(isnull(Admins)) //if this is the first time starting up
Admins = new /list //initialise.






var/savefile/F = new ("s_admin.sav")
F["GMs"] << GMs //save the GM list

F["banned"] << banned //save the banned list

world.log << "Instance closed at approx. [ReportDate(world.realtime)]."
..() //and finish closing with other user-provided procs



mob/GM_verbs
// The GM verbs mob contains all of the verbs. Players should
// NOT be able to be this type of mob.
verb
GM_assimilate(mob/M in world)
set desc = "(NPC) Take over the body of an NPC (Caution!)"
set category = "GM"

if(M.key)
usr << "You can't take over PCs' mobs."
return

//Prevents a possible security breach.
if(istype(M,/mob/admin_GM_verbs) || istype(M,/mob/GM_verbs) \
|| istype(M,/mob/master_GM_verbs))
del(M) //delete the mob. There should never be a mob of those types, ever.

world.log << "[src.name] assimilated [M]."

M.key = src.key


GM_eradicate(atom/M as mob|obj|turf in world)
set desc = "(target) Destroy an mob, obj, or turf"
set category = "GM"

//If they're a player, we should take special consideration and make
//sure that we really do want to boot this person.
var/mob/mob = M
if(istype(mob) && mob.key)

if(mob == src) //don't let people delete themselves!
return

//If the target is a GM that is equal or higher in rank, it sets hash. When hash is
//checked, it'll stop if the GM can't do that.
var/hash = 0
if(GMCheck() && (mob.GMCheck() || mob.AdminGMCheck() || mob.MasterGMCheck())) hash = 1
else if(AdminGMCheck() && (mob.AdminGMCheck() || mob.MasterGMCheck())) hash = 1

if(hash)
usr << "You can't eradicate GMs equal to or higher than you in rank!"
M << "[src] tried to boot you." //tell them there's dissention among the ranks!
return

//If they input yes,
if((input("Are you sure?") in list("Yes","No")) == "Yes")
var/reason = input("Enter a reason if desired.","Reason?") as \
null|text
if(reason)
//This just randomly chooses some "flavour" text. Your reason should generally
//be generic, not suited to any of these, because otherwise it won't make any
//sense.
//An alternate implementation is beneath these.

///*
world << pick(
"A giant hand swoops down to the ground, plucks [mob] into the sky, and \
promptly tosses \him away, whilst shouting \"[reason]\"",
"A vat of liquid nitrogen materialises from nowhere and dumps itself on [mob]. \
The label reads, \"[reason]\"",
"[mob] looks up to see a giant hand. It grabs \him between its fingers and \
smushes him like an ant, booming \"[reason]\"",
"[mob] turns around to see a sniper in the bushes, who promptly puts a hole \
through \his head and says, \"[reason]\"",
"An arrow suddenly flies straight through [mob]'s heart. A note attached to \
the arrow says, \"[reason]\"",
"[mob]'s eyes glaze over as a scroll appears in front of \him that reads \
\"[reason]\" [mob] promptly screams and then vanishes.",
"[mob], suddenly compelled by supernatural forces, writes \"[reason]\" \
in the dirt before committing suicide.",
"A giant sneaker, probably Nike or Reebok, suddenly lands square on top of \
[mob]. A Post-it Note attached to the side reads \"[reason]\"")
//*/

//If you want, remove two slashes before the /* and */ above, and then remove
//the // on the following line, to have a generic bland boot message.
//world << "[src] boots [M] from the world: [reason]"

else
///*
world << pick(
"[mob] suddenly suffers multiple simultaneous heart attacks and collapses \
into a writhing mass of gurgling goo, which drains away into the ground.",
"A giant pit opens in the ground, swallowing [mob] in eternal hellfire, before \
it slams shut once again.",
"An AH-64 Apache Longbow swoops over the horizon and guns down [mob] with \
its chaingun.",
"A glittering golden dragon appears from nowhere, screaming like a banshee, \
eats [mob] in an instant, and vanishes before anyone is any the wiser.",
"[mob] screams as a chestburster erupts from \his internal organs. The alien \
hisses slowly before both [mob] and the creature suddenly vanish.",
"[mob] involuntarily puts \his fingers in \his ears, shouts \"Armageddon!\", \
and explodes, Lemmings-style.",
"[mob] glances up to see a meteor come crashing down on \him, splattering \him \
to pieces.",
"An Klingon D7 Cruiser launches a photon torpedo at [mob] before recloaking and \
warping away.")
//*/

//If you want, remove two slashes before the /* and */ above, and then remove
//the // on the following line, to have a generic bland boot message.
//world << "[src] boots [M] from the world."


world.log << "[src] boots [M] from the world."
if(mob.client) del(mob.client)
if(mob) del(mob)

else
del(M)


GM_create()
set desc = "() Create an object of any type"
set category = "GM"
var/html = "" var/L[] = typesof(/atom) //BYOND BUG /* //strip out illegal options if(L.Find(/atom)) L -= /atom if(L.Find(/atom/movable)) L -= /atom/movable //don't allow these three types, either if(L.Find(/mob/GM_verbs)) L -= /mob/GM_verbs if(L.Find(/mob/master_GM_verbs)) L -= /mob/master_GM_verbs if(L.Find(/mob/admin_GM_verbs)) L -= /mob/admin_GM_verbs*/ for(var/X in L) //WORKAROUND FOR ABOVE BUG switch("[X]") if("/atom", "/atom/movable", "/mob/GM_verbs", "/mob/master_GM_verbs", "/mob/admin_GM_verbs") continue //ignore options of these types //END OF WORKAROUND html += "[X]
usr << browse(html) GM_edit(atom/O in world) set desc = "(object) Modify/examine the variables of any object" set category = "GM" var/html = "" var/variables[0] html += "<h3 align=center>[O.name] ([O.type])</h3>" html += "<table width=100%>\n" html += "<tr>" html += "<td>VARIABLE NAME</td>" html += "<td>PROBABLE TYPE</td>" html += "<td>CURRENT VALUE</td>" html += "</tr>\n" for(var/X in O.vars) variables += X //Protect the key var for mobs, since that's a pretty important var! We don't //want GMs editing players' keys and disconnecting them from their character, //after all. variables -= "key" //Protect the top-secret _temp_gm var! This is used internally only. variables -= "_temp_gm" //Prevent this one, too. GMs should use the GM_movement verb so they are aware. variables -= "_GM_lockmove" //Also protect these lists because you should never edit lists directly. //(And, because s_admin isn't capable of editing lists, and never will be.) variables -= "contents" variables -= "overlays" variables -= "underlays" variables -= "verbs" variables -= "vars" variables -= "group" for(var/X in variables) html += "<tr>" html += "<td>" html += X html += "" if(!issaved(O.vars[X]) || istype(X,/list)) html += " (*)</td>" else html += "</td>" html += "<td>[DetermineVarType(O.vars[X])]</td>" html += "<td>[DetermineVarValue(O.vars[X])]</td>" html += "</tr>" html += "</table>" html += "

//(*) A warning is given when a variable \ may potentially cause an error if modified. If you ignore that warning and \ continue to modify the variable, you alone are responsible for whatever \ mayhem results!" usr << browse(html) GM_time() set desc = "() Get the approx. time the world has been running" set category = "GM" usr << "[ReportTime(world.time)] ([ReportDate(world.realtime)])" GM_locale() set desc = "() Give your X,Y,Z coordinates, or other location" set category = "GM" if(isloc(src.loc)) //if I'm actually in a region if(istype(src.loc,/atom/movable)) //if I'm in a mob or an obj var/atom/movable/O = src.loc usr << "Location: inside [O] at [O.x],[O.y],[O.z]." else if(isturf(src.loc)) //if I'm on a turf usr << "Location: on [src.loc] at [x],[y],[z]." else //if I'm in an area off the map usr << "Location: in [src.loc]." else //I'm sitting in nilspace usr << "Location: nowhere." GM_find(O in (typesof(/atom) - /atom) - /atom/movable) set desc = "() Report coordinates of a desired object" set category = "GM" var/L[0] for(var/atom/A in world) if(L.len > 20) break if(istype(A.type,O)) L += A if(!L.len) usr << "No objects of type [O] found." for(var/atom/A in L) usr << "[A] ([A.type]) [A.x] [A.y] [A.z] -- \..." usr << null GM_teleport() set desc = "() Teleport to coordinates, or to a given object" set category = "GM" if(!world.maxx) var/area/area = input("Teleport to which area?","Teleport:") as null|area in world if(area) src.Move(area) return switch(input("Teleport to what?","Teleport:") as null|anything in \ list("coordinates","object")) if(null) return if("coordinates") var/_x = input("(Range: 1 - [world.maxx])","X Coordinate:",src.x) as null|num var/_y = input("(Range: 1 - [world.maxy])","Y Coordinate:",src.y) as null|num var/_z = input("(Range: 1 - [world.maxz])","Z Coordinate:",src.z) as null|num if(_x > world.maxx || _x < 1) return if(_y > world.maxy || _y < 1) return if(_z > world.maxz || _z < 1) return src.loc = locate(_x,_y,_z) world.log << "[src.name] teleports to [_x],[_y],[_z]." if("object") var/atom/movable/O = input("Choose an object:","Object:") as null|mob|obj in world src.loc = O.loc world.log << "[src.name] teleports to [O]'s location." GM_warp(atom/movable/O in world) set desc = "() Teleport an object to coordinates, or to another object" set category = "GM" if(!world.maxx) var/area/area = input("Teleport [O] to which area?","Teleport:") as null|area in world if(area) O.Move(area) return switch(input("Teleport [O] to what?","Teleport:") as null|anything in \ list("coordinates","object")) if(null) return if("coordinates") var/_x = input("(Range: 1 - [world.maxx])","X Coordinate:",O.x) as null|num var/_y = input("(Range: 1 - [world.maxy])","Y Coordinate:",O.y) as null|num var/_z = input("(Range: 1 - [world.maxz])","Z Coordinate:",O.z) as null|num if(_x > world.maxx || _x < 1) return if(_y > world.maxy || _y < 1) return if(_z > world.maxz || _z < 1) return O.loc = locate(_x,_y,_z) world.log << "[src.name] teleports [O] to [_x],[_y],[_z]." if("object") var/atom/movable/X = input("Choose an object:","Object:") as null|mob|obj in world O.loc = X.loc world.log << "[src.name] teleports [O] to [X]'s location." GM_movement(mob/M in world) set desc = "(victim) Remove movement abilities from a player's mob" set category = "GM" if(GMCheck() && (M.GMCheck() || M.AdminGMCheck() || M.MasterGMCheck())) usr << "You can't lock down any GM equal to or higher in rank." M << "[src] tried to lock down your movement." return else if(AdminGMCheck() && (M.AdminGMCheck() || M.MasterGMCheck())) usr << "You can't lock down any GM equal to or higher in rank." M << "[src] tried to lock down your movement." return M._GM_lockmove = !M._GM_lockmove if(M._GM_lockmove) M << "[src] locks you in place!" world.log << "[src.name] prevents [M] from moving." else M << "[src] releases you." world.log << "[src.name] allows [M] to move." GM_ghostform() set desc = "() Toggle invisibility and lack of density" set category = "GM" src.density = !density src.visibility = !visibility if(!density) oview() << "[src] dematerializes and vanishes!" src << "You dematerialize and vanish." src.overlays += 'GM_ghostform.dmi' world.log << "[src.name] becomes invisible." else oview() << "[src] suddenly rematerializes and appears!" src << "You materialize and appear." src.overlays -= 'GM_ghostform.dmi' world.log << "[src.name] becomes visible." GM_carboncopy(atom/movable/O in world) set desc = "() Create an exact duplicate of a given object" set category = "GM" var/mob/M = O if(istype(M) && M:key) usr << "You can't duplicate PCs' mobs." return //Prevents possible security breach. if(istype(O,/mob/GM_verbs) || istype(O,/mob/admin_GM_verbs) \ || istype(O,/mob/master_GM_verbs)) del(O) var/atom/new_O = new O.type(O.loc) for(var/V in O.vars) if(issaved(O.vars[V])) new_O.vars[V] = O.vars[V] usr << "[O] was duplicated." world.log << "[src.name] duplicated \an [O]." GM_recorded_people() set desc = "() Read the recorded history of all players" set category = "GM" var/connected[0] var/linkdead[0] for(var/mob/M) if(M.key && M.client) connected += M else if(M.key) linkdead += M if(connected.len) usr << "Connected:" for(var/mob/M in connected) usr << "[M.name] \..." if(M.key != M.name) usr << "(Key: [M.key]) \..." usr << "- Inactive for [M.client.inactivity/10] seconds" if(linkdead.len) usr << "Linkdead:" for(var/mob/M in linkdead) var/key = "(Key: [M.key])" usr << "[M.name] [M.key != M.name ? key : ""]" usr << "No longer connected:" GM_who() set desc = "() Advanced WHO command - reports all people connected" set category = "GM" var/connected[0] var/linkdead[0] for(var/mob/M) if(M.key && M.client) connected += M else if(M.key) linkdead += M if(connected.len) usr << "Connected:" for(var/mob/M in connected) usr << "[M.name] \..." if(M.key != M.name) usr << "(Key: [M.key]) \..." usr << "- Inactive for [M.client.inactivity/10] seconds" if(linkdead.len) usr << "Linkdead:" for(var/mob/M in linkdead) var/key = "(Key: [M.key])" usr << "[M.name] [M.key != M.name ? key : ""]" usr << "No longer connected:" GM_GMs_list() set desc = "() Read the list of all GMs' keys" set category = "GM" if(GMs.len) usr << "GMs:" for(var/X in GMs) usr << "--> [X]" if(Admins.len) usr << "Admins:" for(var/X in Admins) usr << "--> [X]" if(!GMs.len && !Admins.len) usr << "There are no recorded GMs or Admins." GM_announce(message as message) set desc = "() Announce something globally" set category = "GM" world << "________________________________
\..." world << "Announcement:
//[message]
\..." world << "________________________________" world.log << "[src.name] announced, \"[message]\"" GM_mindwhisper(mob/M as mob in world, T as text) set desc = "() Silently report a message to someone" set category = "GM" M << "Message from [src]: [T]" src << "Message to [M]: [T]" GM_ban(mob/M in world) set desc = "(person) Remove a player from your world and don't let them return" set category = "GM" if(M == src) return if(!M.key) usr << "That is not a player." return var/hash = 0 if(GMCheck() && (M.GMCheck() || M.AdminGMCheck() || M.MasterGMCheck())) hash = 1 else if(AdminGMCheck() && (M.AdminGMCheck() || M.MasterGMCheck())) hash = 1 if(hash) usr << "You can't ban GMs equal to or higher than you in rank!" M << "[src] tried to ban you." return if(alert("Are you sure?","Ban [M]:","Yes","No") == "Yes") banned += M.key if(M.client) banned += M.client.address del(M.client) for(var/mob/O) if(O.GMCheck() || O.AdminGMCheck() || O.MasterGMCheck()) O << "[src] banned [M]." world.log << "[src.name] banned [M] ([M.key]) from the world." del(M) GM_unban() set desc = "() Remove banned keys and IPs from the banned list" set category = "GM" var/removal = input("Remove which IP/key from the ban list?","Unban:") as null|anything \ in banned if(!removal) return banned -= removal for(var/mob/M) if(M.GMCheck() || M.AdminGMCheck() || M.MasterGMCheck()) M << "[src] removed [removal] from the banned list." GM_rename(atom/O in world, new_name as text) set desc = "(object, new name) Rename any item in the world" set category = "GM" if(ismob(O)) var/mob/M = O var/hash = 0 if(GMCheck() && (M.GMCheck() || M.AdminGMCheck() || M.MasterGMCheck())) hash = 1 else if(AdminGMCheck() && (M.AdminGMCheck() || M.MasterGMCheck())) hash = 1 if(hash) usr << "You can't rename GMs equal to or higher than you in rank." M << "[src] tried to rename you to [new_name]." return world.log << "[src] renamed [O.name] to \"[new_name]\"." src.name = new_namemob/admin_GM_verbs verb GM_add_GM(mob/M in world) set desc = "() Grant GM powers to someone permanently" set category = "GM" if(!M.key) usr << "You can't make NPCs into GMs! Isn't that obvious?" return if(M.GMCheck() || M.AdminGMCheck() || M.MasterGMCheck()) usr << "[M] is already a GM or above." return else world << "[M] is granted GM status by [src]." world.log << "GM [src] (Key: [src.key]) granted GM status to [M] (Key: [M.key])." GMs += M.key M.AddGMVerbs() GM_remove_GM(mob/M in world) set desc = "() Strip GM powers from someone permanently" set category = "GM" if(M == src) usr << "You can't remove yourself!" return if(!M.GMCheck() && !M.AdminGMCheck() && !M.MasterGMCheck()) usr << "[M] has no GM powers." return if(GMCheck() || (AdminGMCheck() && !M.GMCheck())) usr << "You can't strip GM powers from anyone equal to or higher in rank." M << "[src] tried to strip your GM powers." return GMs -= M Admins -= M world << "[M]'s GM status was stripped by [src]." world.log << "GM [src] (Key: \"[src.key]\") removed all GM status from [M] \ (Key: \"[M.key]\")." M.RemoveGMVerbs() GM_add_temp_GM(mob/M in world) set desc = "() Grant temporary GM powers to someone" set category = "GM" if(M == src) usr << "There's no point in explaining what's wrong with using a GM verb to make \ yourself temporarily a GM." return if(M.GMCheck() || M.AdminGMCheck() || M.MasterGMCheck()) usr << "[M] is already a GM or above." return else M._temp_gm = 1 world.log << "GM [src] (Key: \"[src.key]\") granted temporary GM status to [M] \ (Key: \"[M.key]\")." world << "[M] is granted temporary GM powers by [src]." M.AddGMVerbs() M << "You now have GM powers until you disconnect from the world."mob/master_GM_verbs verb GM_add_Admin(mob/M in world) set desc = "() Grant administrative GM powers to someone permanently" set category = "GM" if(!M.key) usr << "You can't make NPCs into GMs! Isn't that obvious?" return if(M.AdminGMCheck() || M.MasterGMCheck()) usr << "[M] is already an administrative GM or above." return else if(M.GMCheck()) world << "[M] is upgraded from GM status to Administrative GM status by [src]." GMs -= M.key else world << "[M] is granted Administrative GM status by [src]." world.log << "GM [src] (Key: \"[src.key]\") granted Admin GM status to [M] \ (Key: \"[M.key]\")." Admins += M.key M.AddGMVerbs() GM_remove_Admin(mob/M in world) set desc = "() Strip administrative GM powers from someone permanently" set category = "GM" if(!M.AdminGMCheck()) usr << "[M] isn't an admin!" return else world.log << "GM [src] (Key: \"[src.key]\") removed Admin GM status from [M] \ (Key: \"[M.key]\")." Admins -= M.key M.RemoveGMVerbs() M.AddGMVerbs() GM_reboot() set desc = "() Restart the world" set category = "GM" if(alert("Are you sure?","Reboot","Yes","No") == "Yes") var/mob/M = src M:GM_announce("World is rebooting in 10 seconds!") sleep(100) world.Reboot()//EDITING, CREATING, AND MINDWHISPER HTML INTERACTIONatom/Topic(href,href_list[]) switch(href_list["action"]) if("edit") if(!usr.GMCheck() && !usr.AdminGMCheck() && !usr.MasterGMCheck()) usr << "You aren't a GM!" return var/variable = href_list["var"] if(ismob(src)) var/mob/M = src if(!ALLOW_GM_SELF_EDIT) if(M == usr && (M.GMCheck() || M.AdminGMCheck())) usr << "You can't edit your own variables or variables of GMs of equal or \ greater rank." return if(M != usr) if(usr.GMCheck() && (M.GMCheck() || M.AdminGMCheck() || M.MasterGMCheck())) usr << "You can't edit the variables of GMs of equal or greater rank." return else if(usr.AdminGMCheck() && (M.AdminGMCheck() || M.MasterGMCheck())) usr << "You can't edit the variables of GMs of equal or greater rank." return var/class = input(usr,"Change [variable] to what?","Variable Type") as null|anything \ in list("text","num","type","reference","icon","file","restore to default") if(!class) return var/initial_value = src.vars[variable] switch(class) if("restore to default") src.vars[variable] = initial(src.vars[variable]) if("text") src.vars[variable] = input("Enter new text:","Text",src.vars[variable]) as text if("num") src.vars[variable] = input("Enter new number:","Num",src.vars[variable]) as num if("type") src.vars[variable] = input("Enter type:","Type",src.vars[variable]) \ in typesof(/atom) if("reference") src.vars[variable] = input("Select reference:","Reference", \ src.vars[variable]) as mob|obj|turf|area in world if("file") src.vars[variable] = input("Pick file:","File",src.vars[variable]) \ as file if("icon") src.vars[variable] = input("Pick icon:","Icon",src.vars[variable]) \ as icon world.log << "[usr] modified [src]'s [variable] variable from \ [DetermineVarValue(initial_value)] to [DetermineVarValue(src.vars[variable])]." usr:GM_edit(src) . = ..()//mobs have different procs.mob/Topic(href,href_list[]) switch(href_list["action"]) if("create") if(!usr.GMCheck() && !usr.AdminGMCheck() && !usr.MasterGMCheck()) usr << "You aren't a GM!" return var/new_type = href_list["type"] var/atom/O = new new_type(src.loc) usr << "Created a new [O.name]." world.log << "[usr] created a new [O.name]." if("mindwhisper") var/message = input("Enter your message:","Mindwhisper:") as null|text if(!message) return src << "Message from [usr]: [message]" usr << "Message to [src]: [message]" . = ..()//This is the proc where all the intuitiveness and ease of the code stems from.mob/proc/AddGMVerbs() //everyone gets the basic package if(GMCheck() || AdminGMCheck() || MasterGMCheck()) for(var/X in typesof(/mob/GM_verbs/verb)) //add every verb src.verbs += X //the master GM and the admins get a few extras! if(AdminGMCheck() || MasterGMCheck()) for(var/X in typesof(/mob/admin_GM_verbs/verb)) //add every verb src.verbs += X //finally, the master GM gets two more for keeping Admins in line if(MasterGMCheck()) for(var/X in typesof(/mob/master_GM_verbs/verb)) src.verbs += X //Set their names to include the prefixes and suffixes. //Be sure not to allow duplication. if(MasterGMCheck()) if(MASTER_GM_PREFIX && !findtext(name, MASTER_GM_PREFIX)) src.name = "[MASTER_GM_PREFIX][name]" if(MASTER_GM_SUFFIX && !findtext(name, MASTER_GM_SUFFIX)) src.name = "[name][MASTER_GM_SUFFIX]" if(AdminGMCheck()) if(ADMIN_GM_PREFIX && !findtext(name, ADMIN_GM_PREFIX)) src.name = "[ADMIN_GM_PREFIX][name]" if(ADMIN_GM_SUFFIX && !findtext(name, ADMIN_GM_SUFFIX)) src.name = "[name][ADMIN_GM_SUFFIX]" if(GMCheck()) if(GM_PREFIX && !findtext(name, GM_PREFIX)) src.name = "[GM_PREFIX][name]" if(GM_SUFFIX && !findtext(name, GM_SUFFIX)) src.name = "[name][GM_SUFFIX]"mob/proc/RemoveGMVerbs() //If you're removing verbs from someone, then you're turning them completely normal. //Since BYOND ignores list subtractions if the list doesn't contain them, we can //simply loop through all of the GM verbs and remove each one. Since removal doesn't //occur too often, this shouldn't be a problem. for(var/X in typesof(/mob/GM_verbs/verb) + typesof(/mob/admin_GM_verbs/verb) + \ typesof(/mob/master_GM_verbs/verb)) src.verbs -= Xmob/var/tmp/_temp_gm = 0mob/var/_GM_lockmove = 0//GM_LOCKMOVE CHECK// This is an additional check added to mob/Move() to account for the _GM_lockmove// variable which locks down mobs.mob/Move() if(_GM_lockmove) return 0 . = ..()//GM STATUS PROCS// These are used to valididate whether a mob is a GM or not. I found myself// typing these same lines over and over again, so I converted them to procs.mob/proc/GMCheck() if(GMs.Find(key) || _temp_gm) return 1 return 0mob/proc/AdminGMCheck() if(Admins.Find(key)) return 1 return 0mob/proc/MasterGMCheck() if(key == MASTER_KEY) return 1 return 0//DATE AND TIME PROCS// These are used to simplify things. The first proc, ReportDate(), will// convert a time in ticks (after January 1, 2000) to a date in laymans' terms.// The second (ReportTime()) will convert a time in ticks to a readable number// in hours, minutes, and seconds.proc/ReportDate(time) var/format = "hh:mm:ss MM/DD/YYYY" return time2text(time, format)proc/ReportTime(time) time = round(world.time/10, 1) //round to the nearest second var/hours = round(time / 3600) time %= 3600 var/minutes = round(time / 60) time %= 60 if(minutes < 10) minutes = "0[minutes]" if(time < 10) time = "0[time]" return "[hours]:[minutes]:[time]"//REPLACE_TEXT PROC// This is a function that does the exact function that dd_replace_text() performs,// but it avoids using lists, which most likely saves time in transition.proc/replace_text(string,search,replace) if(search) while(findtext(string, search)) var/position = findtext(string, search) var/first_portion = copytext(string,1,position) var/last_portion = copytext(string,position+lentext(search)) string = "[first_portion][replace][last_portion]" return string//GM_EDIT PROCS// These are used to format the output of the GM_edit command. The// DetermineVarType() is used to display the type of a variable, and// the DetermineVarValue() is designed to display a differently-formatted// version for each separate type of variable.proc/DetermineVarType(variable) if(istext(variable)) return "Text" if(isloc(variable)) return "Atom" if(isnum(variable)) return "Num" if(isicon(variable)) return "Icon" if(istype(variable,/datum)) return "Type (or datum)" if(isnull(variable)) return "(Null)" return "(Unknown)"proc/DetermineVarValue(variable) if(istext(variable)) return "\"[variable]\"" if(isloc(variable)) return "[variable:name] ([variable:type])" if(isnum(variable)) var/return_val = num2text(variable,13) switch(variable) if(0) return_val += " (FALSE)" if(1) return_val += " (TRUE, NORTH, or AREA_LAYER)" if(2) return_val += " (SOUTH or TURF_LAYER)" if(3) return_val += " (OBJ_LAYER)" if(4) return_val += " (EAST or MOB_LAYER)" if(5) return_val += " (NORTHEAST or FLOAT_LAYER)" if(6) return_val += " (SOUTHEAST)" if(8) return_val += " (WEST)" if(9) return_val += " (NORTHWEST)" if(10) return_val += " (SOUTHWEST)" return return_val if(isnull(variable)) return "null" return "- [variable] -"//VERB ADDITION/REMOVAL// These procs control the default addition and removal of the GM verbs.// Every time a GM connects to a mob, their former self, if any, will lose all// of its GM verbs and their current self will gain them. This is yet another// level of security.mob/Login() . = ..() AddGMVerbs()mob/Logout() RemoveGMVerbs() . = ..()//SECURITY BREACH COUNTERMEASURES// These procs are an extra level of security to prevent a person from drawing// these mob types on the map. You're not allowed!mob/GM_verbs/New() del(src)mob/admin_GM_verbs/New() del(src)mob/master_GM_verbs/New() del(src)
In response to Jap
It's not in the s_admin code. It's in your own code.
In response to Nadrew
What am I missing?
In response to Jap
sounds to me that u have no clue what the hell ur doing anthony. (well i have no clue what i'm doing half the time so i'll shut up.)