It has 11 errors of improper indention and I cant figure it out pleasw help.
Code:
mob/var/obj/wielded
obj/Sword
name = "The Slasher"
icon = 'Sword.dmi'//line 97
verb
Wield()
usr << "You wield [src]."
suffix =" (Wielded)"
usr.wielded = src
Remove()
usr << "You remove [src]."
suffix = null
usr.wielded = null
proc
move_to_ground()
suffix = null
usr.wielded = null
Errors:
Code.dm:97: Inconsistent indentation.
Code.dm:101: Inconsistent indentation.
Code.dm:102: Inconsistent indentation.
Code.dm:103: Inconsistent indentation.
Code.dm:106: Inconsistent indentation.
Code.dm:107: Inconsistent indentation.
Code.dm:108: Inconsistent indentation.
Code.dm:110: Inconsistent indentation.
Code.dm:111: Inconsistent indentation.
Code.dm:112: Inconsistent indentation.
Code.dm:113: Inconsistent indentation.
ID:151191
Feb 21 2001, 7:03 pm
|
|
In response to Deadron
|
|
Got it down to one error!
Code: mob/var/obj/wielded obj/Sword name = "The Slasher" icon = 'Sword.dmi' verb Wield() usr << "You wield [src]." suffix =" (Wielded)" usr.wielded = src Remove() usr << "You remove [src]."//line 106 suffix = null usr.wielded = null proc move_to_ground() suffix = null usr.wielded = null Error: Code.dm:106:error: usr: expected end of statement |
In response to Shane
|
|
For starters here's some. You really gotta get your verbs under verb.
mob/var/obj/wielded obj/Sword name = "The Slasher" icon = 'Sword.dmi'//line 97 verb //These are verbs so they go under (or indented after) verb. Wield() usr << "You wield [src]." suffix =" (Wielded)" usr.wielded = src Remove() usr << "You remove [src]." suffix = null usr.wielded = null proc move_to_ground() suffix = null usr.wielded = null |
In response to karver
|
|
Now I have 19 errors!If you have time you can make the changes cus im lost. :*( Im sorry
Code: #define DEBUG turf/ground icon='floor.dmi' name="Ground" area/entrance icon='entrance.dmi' name="Ground" turf/door icon='door.dmi' density=1 name="Wooden Door" turf/door1 icon='door1.dmi' density=1 name="Wooden Door" turf/door2 icon='door2.dmi' density=1 name="Wooden Door" turf/Door3 icon='door3.dmi' density=1 name="Wooden Door" mob/Zazu icon='Zazu.dmi' density=1 name="Zazu" mob/Damien icon='Damien.dmi' density=1 name="Damien" mob/Hero icon='player.dmi' density=1 Login() Move(locate(/area/entrance)) return ..() turf/StoneWall1 icon='wall.dmi' density=1 name="Stone Wall" turf/StoneWall2 icon='wall1.dmi' density=1 name="Stone Wall" turf/StoneWall3 icon='wall2.dmi' density=1 name="Stone Wall" turf/StoneWall4 icon='wall3.dmi' density=1 name="Stone Wall" turf/StoneWall5 icon='wallcorner.dmi' density=1 name="Stone Wall" turf/StoneWall6 icon='wallcorner1.dmi' density=1 name="Stone Wall" turf/StoneWall7 icon='wallcorner2.dmi' density=1 name="Stone Wall" turf/StoneWall8 icon='wallcorner3.dmi' density=1 name="Stone Wall" obj/Defender icon='defender.dmi' name="The Defender" obj/Sword icon='sword.dmi' name="The Slasher" mob/var/obj/wielded obj/Sword name = "The Slasher"//line 109 icon = 'Sword.dmi'//line 97 verb //These are verbs so they go under (or indented after) verb. Wield() usr << "You wield [src]." suffix =" (Wielded)" usr.wielded = src Remove() usr << "You remove [src]." suffix = null usr.wielded = null proc move_to_ground() suffix = null usr.wielded = null world name = "Cinlair" view = 8 mob = /mob/Hero mob/verb/Greet() world << "Hey Wut Up?!?" obj/verb/proc Get() set src in oview(1) usr << "You get [src]" Move(usr) obj/Click() var/lag = 3 //how fast you do it if(src.density) walk_to(usr,src,1,lag) return else var/obj/T for(T in src) if(T.density) walk_to(usr,src,1,lag) return walk_to(usr,src,0,lag) turf/Click() var/lag = 3 //how fast you do it if(src.density) walk_to(usr,src,1,lag) return else var/turf/O for(O in src) if(O.density) walk_to(usr,src,1,lag) return var/obj/T for(T in src) if(T.density) walk_to(usr,src,1,lag) return walk_to(usr,src,0,lag) mob/Stat() if (statpanel("Inventory")) stat("",usr.contents) obj/Flame Blade icon='Flame Blade.dmi' density=1 name="Flame Blade" Errors: Code.dm:109:error:name :duplicate definition Code.dm:110:error:icon :duplicate definition error:undefined type: //obj/wielded Code.dm:114:error:src:bad var error:undefined type: //obj/wielded Code.dm:116:error:src:bad var Code.dm:116:error:= :expected a constant expression error:undefined type: //obj/wielded Code.dm:119:error:src:bad var Code.dm:192:error:Flame Blade:value not allowed here Code.dm:32:error:icon:bad var Code.dm:34:error:name:bad var Code.dm:37:error:icon:bad var Code.dm:39:error:name:bad var Code.dm:44:error:icon:bad var Code.dm:114:error:text "You wield [].":bad variable definition Code.dm:114:error:usr:bad variable definition Code.dm:119:error:text "You remove [].":bad variable definition Code.dm:119:error:usr:bad variable definition |
In response to Shane
|
|
A lot of the problems start here:
mob/var/obj/wielded obj/Sword name = "The Slasher"//line 109 icon = 'Sword.dmi'//line 97 The first part, mob/var/obj/wielded says you are adding a variable to the mob class which is an object called wielded. Then you add a subclass to that called obj/Sword...the problem is, if you flatten that out, it looks like this: mob/var/obj/wielded/obj/Sword Having obj in there twice doesn't work. The first question is, what exactly are you trying to do here? If you are trying to define a hierarchy of obj/sword, then you have to define that before you add a mob variable for it, something like this: // Define the wielded sword class obj/Sword name = "The Slasher" icon = 'Sword.dmi' // Give mobs a wielded variable. mob/var/obj/wielded Then in your code you can assign a Sword to the variable something like this: mob/New() wielded = new /obj/Sword() return ..() Another problem in the code is classes with spaces in the name, like Flame Blade. You can't have a space in the class path, so that should be like this: obj/FlameBlade icon='Flame Blade.dmi' density=1 name="Flame Blade" In general I would suggest adding just one object or function at a time, then compiling to see if it works. That way you can fix things as they come up. If you add 20 things and then compile, it's hard to figure out what's up... |
It's hard to tell from the HTML which things are really messed up and not...go to line 97 (you can use Ctl-G to goto a line), delete the empty space at the beginning of the line, then insert tabs until it's lined up.
See if that fixes or changes anything.