ID:179528
 
I made closed.dmi and open.dmi what more do I have to do in order for the key code to work? what od i defiine? im not the original user im just subbing for Brandon while hes gone. Can somebody/anybody help out? thank you to whoever. heres the errors with this....please hep fix them-->


loading Knightsoftheround.dme
Key.dm:25:error:O:undefined type: O
Key.dm:26:error:O.keycode:undefined type: O.keycode
Key.dm:19:error:newkey.keycode:bad var
Key.dm:20:error:newkey.name:bad var
Key.dm:20:error:newkey.codekey:bad var
Key.dm:18:newkey :warning: variable defined but not used
Key.dm:25:O :warning: variable defined but not used

someone please help fix these errors




obj/door
var/keycode
var/locked = 0 as num
var/open = 0 as num
icon='closed.dmi'
density = 1
opacity = 1
New()
..()
anchor
keycode = "[rand(1,4)][rand(1,4)][rand(1,4)][rand(1,4)]"
for(var/obj/door/O in world)
if(O.keycode == src.keycode)
goto anchor
src.name = "Door [src.keycode]"
verb/MakeKey()
set src in oview(1)
var/newkey = new /obj/key (usr)
newkey.keycode = src.keycode
newkey.name = "Key [newkey.codekey]"
verb/LockUnlock()
set src in oview(1)
set name = "Lock/Unlock Door"
var/keysmatched = 0 as num
for(var/obj/Key/O in usr.contents)
if(O.keycode == src.keycode)
keysmatched += 1
if(keysmatched > 0)
if(!src.locked)
src.locked = 1
else
src.locked = 0
verb/OpenClose()
set src in oview(1)
set name = "Open/Close Door"
if(!src.locked)
if(src.open)
src.open = 0
src.icon = 'closed.dmi'
src.density = 1
src.opacity = 1
else
src.open = 1
src.icon = 'open.dmi'
src.density = 0
src.opacity = 0
else
usr << "The door is locked."
obj/key/var/keycode
Migzor wrote:
I made closed.dmi and open.dmi what more do I have to do in order for the key code to work? what od i defiine? im not the original user im just subbing for Brandon while hes gone. Can somebody/anybody help out? thank you to whoever. heres the errors with this....please hep fix them-->

You already posted this in a different thread. Bumping posts is obnoxious enough, but posting it in a completely new thread... egads.

Lummox JR