set chan "#quix"
set sillaba 0
set scarabeo 0
set uno 0
set scarabeoplus 0
bind pub - !quix start_votazione
bind pub - !votasillaba votosillaba
bind pub - !votascarabeoplus votoscarabeoplus
bind pub - !votauno votouno
bind pub - !votascarabeo votoscarabeo
proc start_votazione {nick host hand chan text} {
global sillaba scarabeo scarabeoplus uno
set sillaba 0
set scarabeo 0
set uno 0
set scarabeoplus 0
putserv "PRIVMSG $chan :8,2Sono Partite Le Votazioni per il prossimo gioco!!"
putserv "PRIVMSG $chan :8,2Giochi Disponibili :\002SILLABA , UNO , SCARABEO , SCARABEOPLUS"
putserv "PRIVMSG $chan :8,2Potete Votare il Gioco con \0028,4!vota\002 8,2(Es.\002\8,4!votasillaba\0028,2 Tutto attaccato)"
putserv "PRIVMSG $chan :8,2Avete 1 Min !! \002NO CLONI , NO FLOOD\002 Pena BAN!!"
timer 1 fine:voto
return 0
}
proc votosillaba {nick host hand chan text} {
global sillaba
incr sillaba
putserv "NOTICE $nick :Voto Registrato"
}
proc votouno {nick host hand chan text} {
global uno
incr uno
putserv "NOTICE $nick :Voto Registrato"
}
proc votoscarabeoplus {nick host hand chan text} {
global scarabeoplus
incr scarabeoplus
putserv "NOTICE $nick :Voto Registrato"
}
proc votascarabeo {nick host hand chan text} {
global scarabeo
incr scarabeo
putserv "NOTICE $nick :Voto Registrato"
}
proc fine:voto {} {
global sillaba scarabeo uno scarabeoplus chan
set chan "#quix"
putserv "PRIVMSG $chan :Fine Votazioni!"
if {????????} {
putserv "PRIVMSG $chan :Il Prossimo Gioco Sarà \002SILLABA\002 Voti: $sillaba "
putserv "NOTICE Quix :sillabaon 200 0000"
} elseif {?????????} {
putserv "PRIVMSG $chan :Il Prossimo Gioco Sarà \002SCARABEO\002 Voti : $scarabeo"
putserv "NOTICE Quix :sccon 200 0000"
} elseif {?????????} {
putserv "PRIVMSG $chan :Il Prossimo Gioco Sarà \002UNO\002 Voti : $uno"
} elseif {?????????} {
putserv "PRIVMSG $chan :Il Prossimo Gioco Sarà \002 SCARABEO PLUS\002 Voti : $scarabeoplus"
putserv "NOTICE $chan :scarabeon 200 0000"
return 0
}
I try to write a script for vote a various games in one chan ...
When the people vote the game ... the biggest variable win and start the game ... but i don't understand ...
the problem is in the "fine:voto" ... {?????} for define the biggest variable...
Please Help Me!!
1. $sillaba compare with $uno and $scarabeo and $scarabeoplus
2. $scarabeo compare with $uno and $sillaba and $scarabeoplus
3. $scarabeoplus compare with $uno and $sillaba and $scarabeo
3. $uno compare with $sillaba and $scarabeo and $scarabeoplus
proc fine:voto {} {
global sillaba scarabeo chan
set chan "#quix"
putserv "PRIVMSG $chan :Fine Votazioni!"
set max $uno
if {$sillaba > $max } {set max $sillaba}
if {$scarabeo > $max} {set max $scarabeo}
if {$scarabeoplus > $max} {set max $scarabeoplus}
if {$max == $sillaba} {
putserv "PRIVMSG $chan :Il Prossimo Gioco Sarà \002SILLABA\002 Voti: $sillaba"
} elseif {$max == $uno} {
putserv "PRIVMSG $chan :Il Prossimo Gioco Sarà \002UNO\002 Voti: $uno"
} elseif {$max == $scarabeoplus} {
putserv "PRIVMSG $chan :Il Prossimo Gioco Sarà \002SCARABEO PLUS\002 Voti: $scarabeoplus"
} elseif {$max == $scarabeo} {
putserv "PRIVMSG $chan :Il Prossimo Gioco Sarà \002SCARABEO\002 Voti: $scarabeo"
return 0
}
I write this but the tcl not start ... read this error:
[16:12] missing close-brace
while executing
"proc fine:voto {}"
(file "scripts/voto.tcl" line 51)
invoked from within
"source scripts/voto.tcl"
(file "eggdrop.conf" line 175)
[16:12] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)