ID:2538458
 
(See the best response by SpaceManiac.)
Code:
            UpdateServer()//Get your .dmb file ready and choose the file.
set name = "Update Server"
set category = "GM"
var/mob/P = usr
if(P) P << "Please open the PEntropia.dmb file,'DMB.png'"
if(!P) return
var/DMB = input("Please choose the DMB file",,"Cancel") as file
if(DMB == "Cancel"){return}
world <<"<b><center><B> Rebooting in 10 seconds." //Tells the world that were rebooting for an update.
sleep(100) //wait 10 seconds before we reboot.
fdel("PEntropia.dmb") //Delete your currunt .dmb
fdel("PEntropia.rsc") //Delete your currunt .rsc
world <<"<b><center><B>Rebooting Now." //Reboot.
SaveWorld()
fcopy(DMB,"PEntropia.dmb") //Copy the file over.
world.Reboot() //Reboot.


Problem description:
Does anyone know a way to add a cancel button to the file screen in case I click this verb in-game accidentally? Thank you ^^
Best response
Changing "as file" to "as file|null" will add a Cancel button to the dialog, which will set DMB to null when selected.
sweet thanks! So I just have to set "Cancel" to null and I'm all set? tyvm ^^
I mean in addition to what you said
In response to Kyubikitsune
Yes