ID:148963
 
I am trying to convert my look verb into an obj but it doesn't seem to work. Can I please have some help?

mob/verb/Look(M as mob in oview(7))
set hidden = 1
set category = "Actions"
view(7) << "[usr] stares at [M] to some up his abilities"
usr << "\yellow [M] ([M:key])"
usr << "\yellow Trained in the fighting style of [M:FS]"
usr << "\yellow Ranked as a [M:rank]"
usr << "\yellow Is with the alliance of [M:gang]"
if(usr.rank == M:rank)
usr << "\yellow [M] would be a good oppenent!"
if(usr.rank < M:rank)
usr << "\yellow [M] wouldn't be much of a challenge!"
if(usr.rank > M:rank)
usr << "\yellow [M] would give you a run for your money"


~Ray~
Stimulus wrote:
I am trying to convert my look verb into an obj but it doesn't seem to work. Can I please have some help?

mob/verb/Look(M as mob in oview(7))
set hidden = 1
set category = "Actions"
view(7) << "[usr] stares at [M] to some up his abilities"
usr << "\yellow [M] ([M:key])"
usr << "\yellow Trained in the fighting style of [M:FS]"
usr << "\yellow Ranked as a [M:rank]"
usr << "\yellow Is with the alliance of [M:gang]"
if(usr.rank == M:rank)
usr << "\yellow [M] would be a good oppenent!"
if(usr.rank < M:rank)
usr << "\yellow [M] wouldn't be much of a challenge!"
if(usr.rank > M:rank)
usr << "\yellow [M] would give you a run for your money"


~Ray~

Change all of your colons into periods. Periods are the proper way to refer to variables within an atom.
In response to Malver
Malver wrote:
Change all of your colons into periods. Periods are the proper way to refer to variables within an atom.

I was right, you are progressing pretty well with DM. I still need help wih this though lol.

~Ray~
In response to Stimulus
Stimulus wrote:
Malver wrote:
Change all of your colons into periods. Periods are the proper way to refer to variables within an atom.

I was right, you are progressing pretty well with DM. I still need help wih this though lol.

You need to say what is going wrong if you need help. Tell us what you want to happen, and in what way the program fails that.
In response to Skysaw
Skysaw wrote:
You need to say what is going wrong if you need help. Tell us what you want to happen, and in what way the program fails that.

Sorry, I guess I didn't make it clear enough.
I am trying to convert a few verbs into icons to put them in verbless stat panels. I tried to do that with my Look verb and it gets no errors, but it doesn't work. Here is what I have:

mob/verb/Look(M as mob in oview(7))
set hidden = 1
set category = "Actions"
view(7) << "[usr] stares at [M] to some up his abilities"
usr << "\yellow [M] ([M:key])"
usr << "\yellow Trained in the fighting style of [M:FS]"
usr << "\yellow Ranked as a [M:rank]"
usr << "\yellow Is with the alliance of [M:gang]"
if(usr.rank == M:rank)
usr << "\yellow [M] would be a good oppenent!"
if(usr.rank < M:rank)
usr << "\yellow [M] wouldn't be much of a challenge!"
if(usr.rank > M:rank)
usr << "\yellow [M] would give you a run for your money"

obj/Look
icon = 'HUD.dmi'
icon_state = "Look"
Click()
usr.Look()


~Ray~
In response to Stimulus
Stimulus wrote:
Malver wrote:
Change all of your colons into periods. Periods are the proper way to refer to variables within an atom.

I was right, you are progressing pretty well with DM. I still need help wih this though lol.

~Ray~

I just told you how to solve the errors on that snippet of code. What's the problem?
In response to Stimulus
First of all, it should be a proc, not a verb. Have a verb that calls the proc if you want both. Second, when you call the proc, the M as mob in oview(7) doesn't get inputted, so you'll need an input, so when you click on the look object, have...

var/mob/M = input(mob in oview(7))
usr.Look(M)

Or something, I'm tired. Also, using colons will NEVER generate a compilation error, unless if the var is never, ever created. It's used in cases where some piece of input makes sure the mob/obj/turf/etc. has that var, but because the compiler can't always tell (like if(istype(mob/M,mob/Ugly) return) when you're making sure it'll work, you have to use a colon just to get it to compile. It'll produce a runtime error if the mob doesn't have that var defined. Uh oh, I'm rambling again...