ID:163621
 
mob/admin/verb
Create()
switch(input(usr,"Choose a category") in list ("Equipment"))
if("Equipment")
usr.Create_equipment

mob/verb
Create_equipment(O in typesof(/obj/equipment)){set category = "GM";
set desc="Create an Object, Mob, or Turf.";
if(!O)return;var/obj/T = new O(usr.loc);
if(ispath(T,/obj/))
T.owner=usr
if(T.wall||T.floor)
T.saveable=1
world.log<<"<font color=#607B8B>[usr] created a [T:name].";
view() << "Using their Godly powers, [usr] summons a [T:name] appeared."}

See this I want to turn the verb into a proc... But when I do I get an error how can I do this?
And what error might "an error" be?
In response to Foomer
login2.dm:7::warning: empty switch statement
login2.dm:8:usr :warning: unused label
login2.dm:8:Create_equipment :warning: unused label
In response to Hellonagol
Hellonagol wrote:
> login2.dm:7::warning: empty switch statement
> login2.dm:8:usr :warning: unused label
> login2.dm:8:Create_equipment :warning: unused label
>


That's because you didn't indent the if() enough after the switch statement:

mob/admin/verb
Create()
switch(input(usr,"Choose a category") in list ("Equipment"))
if("Equipment")
usr.Create_equipment


Should be:

mob/admin/verb
Create()
switch(input(usr,"Choose a category") in list ("Equipment"))
if("Equipment")
usr.Create_equipment
In response to Foomer
mob/admin/verb
Create()
switch(input(usr,"Choose a category") in list ("Equipment"))
if("Equipment")
usr.Create_equipment

mob/proc
Create_equipment(O in typesof(/obj/equipment)){set category = "GM";
set desc="Create an Object, Mob, or Turf.";
if(!O)return;var/obj/T = new O(usr.loc);
if(ispath(T,/obj/))
T.owner=usr
if(T.wall||T.floor)
T.saveable=1
world.log<<"<font color=#607B8B>[usr] created a [T:name].";
view() << "Using their Godly powers, [usr] summons a [T:name] appeared."}

Is giving me the error
loading hazordhu.dme
loading Macros.dms
login2.dm:8:usr :warning: unused label
login2.dm:8:Create_equipment :warning: unused label
loading Newmap1.dmp
loading underground.dmp
saving hazordhu.dmb

hazordhu.dmb - 0 errors, 2 warnings (double-click on an error to jump to it)
In response to Hellonagol
Create_equipment()
In response to Zythyr
.<