if(!src in oview(1))return
ID:161861
![]() Mar 23 2008, 12:21 pm
|
|
ok, i've just found a glitch where you can walk away from a fight and still attack the target over a distance. I tried this:
|
![]() Mar 23 2008, 12:37 pm
|
|
Im not so good with ! and whatnot but i would use
|
! makes a conditional negative. So, no offense, but i don't think you know what you're talking about here.
|
XD believe me i i do, i code alot use what i sent it will work.
(yes i know not using ! seems newbie but what u gonna do =/) |
! has a higher operational standing than 'in', so what the program thinks you are asking is the following:
if(!src in X) Solution: Bracket the object and the list you are looking in: if(!(src in X)) |
ooooohh, that makes sense. I don't know anything about operational standing. once I coded something which caused a bug that glitched up half of my game, and it all turned out to be because i didn't know that && has a higher operational standing than ||.
|
The !, i know what it does but idk what it would do in
if(!src in oview(1)) but if(src in oview(1)) if(us in oview(1)) See if the usr is within one tile it will continue down and execute the command under it, but if the usr is not within one tile it will simply skip down to the return command. |
Even I don't remember how the operational standing is (didn't bother to remember, just remembering that ! > 'in'), so I usually bracket in my operations if different types of operations are being done in one line.
If you are interested in the order of operations, check out the operators entry in the DM Reference |