ID:147405
 
mob/var/eye_sight = "4"

mob/verb/Look(M as mob) // Fix view("[usr.eye_sight]")
set src in view("[usr.eye_sight]")
world << "[usr] looks at [M]."
usr << "[name]" // Place mob's visible variables

The problem is that the compiler won't let me for the variable, eye_sight inside view(). What's the problem here? I don't see why this shouldn't be allowed.


Thank you,

ZLegend
I believe this is because eye_sight isn't a list... isn't eye-sight just allowing you to see a certain distance? In which case you need to find a way to tell if it's in your site :)
view() only takes two arguments: an atom and a number. Text strings aren't allowed.
In response to Jon Snow
Jon Snow wrote:
I believe this is because eye_sight isn't a list... isn't eye-sight just allowing you to see a certain distance? In which case you need to find a way to tell if it's in your site :)


No acually, its implemented into using oview, view and what-not. It limits how far someone could using an ability on. For example:

Joe is 10 blocks away from Bob. Bob wants to talk to Joe, but his eye_sight is only 6 so Joe has to get closer so they can talk.
In response to Garthor
thank you, that's all I needed.
In response to Garthor
If you mean that text strings are not allowed in place of an object reference, then yes that is so. But you can use a text string in place of the distance in the "[width]x[height]" format. view("3x1",object) will return everything in view that is at the same y coordinate and within 1 unit on the x axis.
In response to Loduwijk
Right. I've never tried that.
This is another thing which must have been left out of the help file, for it is not there. Someone who knows all the details please explain.
In response to Loduwijk
It's his own variable.