Because if Brackets not present, it tries to interpret the variable %nachrichten. first and then on the retrieved data to add the $nick.
For example if u try
if (%nachrichten. $+ $nick == $nick) {
The evaluation will be true, because the %nachricten variable does not contain anything , so the only thing it will be check , will be $nick
if ($nick == $nick) {
so the logical expression is true. Brackets allows you to attack to variable's name something dynamic
Thanks, i still dont quite understand a lot of this script language..
So like this every 5th message will add 1 point.
How would i have to change it to give points per activity? Like it is right now it gives points for 5 messages without a time window. It could take like 20 hours in theory and give points. Soooo how would i measure activity to like.. messages a minute -> points ?
Sorry if i didnt make it clear.
Another question: How do i post code like that in a comment?
Theres an error in your code
on *:TEXT:*:*: {
if (%nachrichten. $+ $nick == 4) {
set %nachrichten. $+ $nick 0
msg $chan test
add.pts $+(#,.,$nick)}
else { inc %nachrichten. $+ $nick }
}
msg $chan test2
}
The Else is inherited in the "if", It should be out of the bracket, to continue after if fail.
on *:TEXT:*:*: {
if (%nachrichten. $+ $nick == 4) {
set %nachrichten. $+ $nick 0
msg $chan test
add.pts $+(#,.,$nick)}
}
else { inc %nachrichten. $+ $nick }
msg $chan test2
}
Use tags [ code]
Thanks, but could you tell me why you need these?