ID:144522
 
I Get Indention Errors and cant Generate the map Please Help me
//This is a test world created by <LilMain> on <11/4/2006>.


mob
icon = 'person.dmi' //make it so all mobs will be created with the person icon
var
HP = 30 //define a new variable called HP, with a value of 30
bug //new prototype
icon = 'bug.dmi' //override the parent's icon, which was 'person.dmi'
Login()
icon_state = gender //when a player logs in, get them the right icon state for
..() //the gender of their key. Then call the parent!

proc
DeathCheck() //check to see if an attack is deadly
if (HP <= 0) //if the defender's HP is low enough...
world << "[src] dies!" //give the death messaging

verb
attack(mob/M as mob in oview(1)) //attack a mob within 1 tile of you
usr << "You attack [M]!" //send this message to the usr
oview() << "[usr] attacks [M]!" //send this message to everybody else
var/damage = rand(1,10) //assign a random # to a new variable
world << "[damage] damage!" //tell the damage to the world
M:HP -= damage //take away the damage from M
M:DeathCheck() //check for death with a proc

say(msg as text) //what the usr says is passed into "msg" as text
world << "[usr]: [msg]" //the world sees chatroom-like output

turf
grass //define a "grass" prototype, which is a kind of turf...
icon = 'grass.dmi' //that has an icon named 'grass.dmi'. In single quotes!

world //set one of our world's characteristics:
turf = /turf/grass //its default turf is the grass turf.


Errors:I Get Indention Errors and cant Generate the map Please Help me

Dream maker is alittle weird like that. I would delete all the spaces on every line. (Like before the code not the spaces inside the code. Then retab them out again.
This usually happens when some of your code is indented with tabs and some with spaces. If you copy and paste code from different sources this happens a lot.
The indentation error may be caused by your incorrect indentation of the bug. If you want the bug to be a mob, you have to indent everything one space to the right like so

mob
icon = 'person.dmi' //make it so all mobs will be created with the person icon
var
HP = 30 //define a new variable called HP, with a value of 30
bug //new prototype
icon = 'bug.dmi' //override the parent's icon, which was 'person.dmi'
Login()
icon_state = gender //when a player logs in, get them the right icon state for
..()


Also, you shouldn't be doing M:HP or M:DeathCheck(). The proper way, in this and most situations, is to do M.HP and M.DeathCheck().
In response to DeathAwaitsU
DeathAwaitsU wrote:
The indentation error may be caused by your incorrect indentation of the bug. If you want the bug to be a mob, you have to indent everything one space to the right like so

> mob
> icon = 'person.dmi' //make it so all mobs will be created with the person icon
> var
> HP = 30 //define a new variable called HP, with a value of 30
> bug //new prototype
> icon = 'bug.dmi' //override the parent's icon, which was 'person.dmi'
> Login()
> icon_state = gender //when a player logs in, get them the right icon state for
> ..()
>

Also, you shouldn't be doing M:HP or M:DeathCheck(). The proper way, in this and most situations, is to do M.HP and M.DeathCheck().


I think you idented Login() and all underneath a little to far >_>.
In response to Tazor07
Ok well i retabed everything n' then i pressed compile n' then i had 30 new different errors

//This is a test world created by <LilMain> on <11/4/2006>.


mob
icon = 'person.dmi' //make it so all mobs will be created with the person icon
var
HP = 30 //define a new variable called HP, with a value of 30
bug //new prototype
icon = 'bug.dmi' //override the parent's icon, which was 'person.dmi'
Login()
icon_state = gender //when a player logs in, get them the right icon state for
..()


proc
DeathCheck() //check to see if an attack is deadly
if (HP <= 0) //if the defender's HP is low enough...
world << "[src] dies!" //give the death messaging

verb
attack(mob/M as mob in oview(1)) //attack a mob within 1 tile of you
usr << "You attack [M]!" //send this message to the usr
oview() << "[usr] attacks [M]!" //send this message to everybody else
var/damage = rand(1,10) //assign a random # to a new variable
world << "[damage] damage!" //tell the damage to the world
M:HP -= damage //take away the damage from M
M:DeathCheck() //check for death with a proc

say(msg as text) //what the usr says is passed into "msg" as text
world << "[usr]: [msg]" //the world sees chatroom-like output

turf
grass //define a "grass" prototype, which is a kind of turf...
icon = 'grass.dmi' //that has an icon named 'grass.dmi'. In single quotes!

world //set one of our world's characteristics:
turf = /turf/grass //its default turf is the grass turf.


My Errors:loading Testworld.dme
Testworld.dm:17:error:if :invalid proc definition
Testworld.dm:18:error::invalid proc definition
Testworld.dm:22:error:usr:duplicate definition
Testworld.dm:22:error:M:value not allowed here
Testworld.dm:22:error::empty type name (indentation error?)
Testworld.dm:22:error:text "You attack []!":value not allowed here
Testworld.dm:22:error::duplicate definition
Testworld.dm:22:error:<< :duplicate definition
Testworld.dm:23:error::duplicate definition
Testworld.dm:23:error:usr:value not allowed here
Testworld.dm:23:error::duplicate definition
Testworld.dm:23:error:M:value not allowed here
Testworld.dm:23:error::duplicate definition
Testworld.dm:23:error:text "[] attacks []!":value not allowed here
Testworld.dm:23:error::duplicate definition
Testworld.dm:23:error:<< :duplicate definition
Testworld.dm:24:error:= :expected a constant expression
Testworld.dm:25:error:world:duplicate definition
Testworld.dm:25:error:damage:value not allowed here
Testworld.dm:25:error::empty type name (indentation error?)
Testworld.dm:25:error:text "[] damage!":value not allowed here
Testworld.dm:25:error::duplicate definition
Testworld.dm:25:error:<< :duplicate definition
Testworld.dm:26:error:M/:/HP:duplicate definition
Testworld.dm:26:error:damage:duplicate definition
Testworld.dm:26:error:-= :instruction not allowed here
Testworld.dm:27:error:DeathCheck :duplicate definition
Testworld.dm:16:error:DeathCheck :previous definition
Testworld.dm:30:error:world:duplicate definition
Testworld.dm:30:error:usr:value not allowed here
Testworld.dm:30:error::duplicate definition
Testworld.dm:30:error:msg:value not allowed here
Testworld.dm:30:error::duplicate definition
Testworld.dm:30:error:text "[]: []":value not allowed here
Testworld.dm:30:error::duplicate definition
Testworld.dm:30:error:<< :duplicate definition

Testworld.dmb - 36 errors, 0 warnings (double-click on an error to jump to it)
In response to LilMain
//This is a test world created by <LilMain> on <11/4/2006>.


mob
icon = 'person.dmi'
var
HP = 30
bug
icon = 'bug.dmi'
Login()
icon_state = "gender"
..()
proc
DeathCheck() //check to see if an attack is deadly
if (HP <= 0) //if the defender's HP is low enough...
world << "[src] dies!" //give the death messaging

verb
attack(mob/M as mob in oview(1)) //attack a mob within 1 tile of you
usr << "You attack [M]!" //send this message to the usr
oview() << "[usr] attacks [M]!" //send this message to everybody else
var/damage = rand(1,10) //assign a random # to a new variable
world << "[damage] damage!" //tell the damage to the world
M.HP -= damage //take away the damage from M
M.DeathCheck() //check for death with a proc

say(msg as text) //what the usr says is passed into "msg" as text
world << "[usr]: [msg]" //the world sees chatroom-like output

turf
grass //define a "grass" prototype, which is a kind of turf...
icon = 'grass.dmi' //that has an icon named 'grass.dmi'. In single quotes!

world //set one of our world's characteristics:
turf = /turf/grass //its default turf is the grass turf.


Your DeathCheck procedure didn't belong to the mob parent anymore :/ as well as your verb say and attack. And all of attacks properties were looked at as new verbs (which wouldn't work for any of them) because they weren't indented under attack.
WOW it worked thanx!!!


but i kno since im new at this imma be back ALOT!! lol
In response to LilMain
ok well now i cnat see my charcter or the monster n' i tried to fix it but i cant
No, I indented it according to what seemed like he wanted.

But looking at it again, I agree that he probably wanted mob/Login() not mob/bug/Login().
In response to LilMain
I'd strongly recommend reading the DM Guide.

More specifically, these two chapters:

Chapter 3. Objects in the Tree

Chapter 4. Verbs
In response to LilMain
//This is a test world created by <LilMain> on <11/4/2006>.



mob/Login()
src.icon_state = "male"
..()
mob
icon = 'person.dmi' //make it so all mobs will be created with the person icon
var
HP = 30 //define a new variable called HP, with a value of 30
bug //new prototype
icon = 'bug.dmi' //override the parent's icon, which was 'person.dmi'



proc
DeathCheck() //check to see if an attack is deadly
if (HP <= 0) //if the defender's HP is low enough...
world << "[src] dies!" //give the death messaging
del(src)

verb
attack(mob/M as mob in oview(1)) //attack a mob within 1 tile of you
usr << "You attack [M]!" //send this message to the usr
oview() << "[usr] attacks [M]!" //send this message to everybody else
var/damage = rand(1,10) //assign a random # to a new variable
world << "[damage] damage!" //tell the damage to the world
M:HP -= damage //take away the damage from M
M:DeathCheck() //check for death with a proc

say(msg as text) //what the usr says is passed into "msg" as text
world << "[usr]: [msg]" //the world sees chatroom-like output

turf
grass //define a "grass" prototype, which is a kind of turf...
icon = 'grass.dmi' //that has an icon named 'grass.dmi'. In single quotes!

world //set one of our world's characteristics:
turf = /turf/grass //its default turf is the grass turf.

try that maybe
In response to Ruben7
o im sooo srry!! i kinda fixed it last night cuzz i had da add da icon_states but thanx anywayz! :)
In response to LilMain
np >.>