ID:157786
 
in my output where normal messgae such as say and etc it shows procs. i want to stop it from showing these. http://img258.imageshack.us/img258/6534/001.png

also i want to show message in my output / its called output , name of output/ but it wont show the messages that i put in there.

proc/Fight()
for(var/mob/M in get_step(usr,usr.dir))
var/damage = src.strength
M.health -= damage
M << "[src] attacks you for [damage] damage!!"
src<<"You attack [M] for [damage] damage!!"
M.deathcheck()
Those are runtime errors, which will show in your default output when (go figure) a runtime error is detected. You can't stop them other than to not have a default output, but why would you not want to see them? You won't be able to debug very easily without them.

To output things to a different output element or grid, use the output proc.
Fierynathan wrote:
in my output where normal messgae such as say and etc it shows procs. i want to stop it from showing these. http://img258.imageshack.us/img258/6534/001.png

also i want to show message in my output / its called output , name of output/ but it wont show the messages that i put in there.
> proc/Fight()
> for(var/mob/M in get_step(usr,usr.dir))//replace usr with src
> var/damage = src.strength
> M.health -= damage
> M << "[src] attacks you for [damage] damage!!"
> src<<"You attack [M] for [damage] damage!!"
> M.deathcheck()

first of all replace usr with src. Thats bad coding there. As far as the runtime error goes it looks like a simple problem with the variable player located in the proc
Bump(). Make sure you do not have any infinite loops there.
In response to Gamekrazzy
Gamekrazzy wrote:
first of all replace usr with src. Thats bad coding there.

That's even worse programming there. Just like how usr isn't always automagically appropriate and the exact object which is on your mind at the moment, so is src.
When choosing what var to use to reference your desired object, you need to consider the situation first and decide on an appropriate method or var to use to access that object.
This means you don't automatically just write src, usr or anything else. Blindly replacing usr with src in your code amounts to guesswork programming. It's important that you actually understand what you're doing and why, as well as actually know enough about things before you used them (or recommend others to). In this particular example, the proc is a global one, meaning it isn't attached to any object and thus has no source object, meaning that its src var will normally be null.

As far as the runtime error goes it looks like a simple problem with the variable player located in the proc
Bump(). Make sure you do not have any infinite loops there.

Apparently the multiple errors he received wasn't because of a loop but because he was just repeatedly bumping into stuff. Or so it would seem from his post.
The error looks like a classic example of : operator abuse "converting" what should be a compile-time error to a runtime one (though it could also be from using . with bad typecasting).
In response to Kaioken
hmm seem really complicated , heh. i only started coding about 3 months ago i get a bit of the basic yet i dont seem to understand the whole system.=/
In response to Fierynathan
nvm i seem to find the problem and elimate it somehow
In response to Kaioken
Kaioken wrote:
Gamekrazzy wrote:
first of all replace usr with src. Thats bad coding there.

That's even worse programming there. Just like how usr isn't always automagically appropriate and the exact object which is on your mind at the moment, so is src.
When choosing what var to use to reference your desired object, you need to consider the situation first and decide on an appropriate method or var to use to access that object.
This means you don't automatically just write src, usr or anything else. Blindly replacing usr with src in your code amounts to guesswork programming. It's important that you actually understand what you're doing and why, as well as actually know enough about things before you used them (or recommend others to). In this particular example, the proc is a global one, meaning it isn't attached to any object and thus has no source object, meaning that its src var will normally be null.
I agree with you on the runtime error. As for the src in this case it is nesesary,I know that the proc is global, but because the src is the one using the verb which in turn uses his proc, would it not be better coding?