blackjack.tcl
#1
I have a tcl blackjack and it throws an error:


Tcl error [blackjack:genug]: can't set "::player(kick,#IRCops)": variable isn't array
invalid command name "bgerror"
while executing
"bgerror {can't set "::player(kick,#IRCops)": variable isn't array}"

I will leave the file here


Attached Files
.tcl   blackjack.tcl (Size: 16.78 KB / Downloads: 6)
#2
Edit line 278:

tcl
array set ::player(kick,$chan) "$::blackjack(player,$chan)"


BTW, I don't understand why it creates a global variable player to unset it at the end of the proc.
zeolia: tchat gratuit, sans inscription ni publicité
Merci de ne pas demander d'aide en MP
Away
#3
(28/05/2020, 13:22)CrazyCat Wrote: Edit line 278:

tcl
array set ::player(kick,$chan) "$::blackjack(player,$chan)"


BTW, I don't understand why it creates a global variable player to unset it at the end of the proc.

I honestly don't know, I downloaded it from tclarchive.net

I have several errors in that tcl. unfortunately it never worked well for me


[17:18:32] Tcl error [blackjack:karte]: can't read "::blackjack(gesamt,wert,#amigos,~ViveChat@HiJoS.DeL.TrUeNo)": no such element in array
invalid command name "bgerror"
while executing
"bgerror {can't read "::blackjack(gesamt,wert,#amigos,~ViveChat@12HiJoS.13DeL.3TrUeNo)": no such element in array}"
#4
Ok, so we have to correct a script which peharps never worked.
Gonna have a look on that, but don't expect anything before monday :)
zeolia: tchat gratuit, sans inscription ni publicité
Merci de ne pas demander d'aide en MP
Away
#5
no problem brother, I have time, take yours;). make it quiet
#6
Bonsoir, le blackjack est disponile en français ?
#7
Pas que je sache.
La seule version que je connaisse est celle fournie par GaMbiTo et qui ne fonctionne pas pour l'instant.
zeolia: tchat gratuit, sans inscription ni publicité
Merci de ne pas demander d'aide en MP
Away
#8
@GaMbiTo: you can try https://gitlab.com/tcl-scripts/games/bla...ckjack.tcl
There is probably remaining errors, but I didn't get any when testing.

I also have changed the colors encoding to respect tcl programming conventions.
zeolia: tchat gratuit, sans inscription ni publicité
Merci de ne pas demander d'aide en MP
Away
#9
not work bro.... ;(


[00:46:49] Tcl error [blackjack:genug]: can't set "::player(kick,#amigos)": variable isn't array
invalid command name "bgerror"
while executing
"bgerror {can't set "::player(kick,#amigos)": variable isn't array}"
#10
(11/06/2020, 05:47)GaMbiTo Wrote: not work bro.... ;(


[00:46:49] Tcl error [blackjack:genug]: can't set "::player(kick,#amigos)": variable isn't array
invalid command name "bgerror"
   while executing
"bgerror {can't set "::player(kick,#amigos)": variable isn't array}"

C'est impossible que cela fonctionne. Ca veux set avec un nom de variables qui comporte des caractères non alphanumérique. -> #~@ etc..
Retrouvez les dernières modifications de mes scripts TCL (versions Alpha/Bêta) ainsi que d'autres de mes réalisations sur ma page GitHub et les versions stables dans la section scripts de ce site  8-)
#11
Ah bon ?

tcl
% set player(kick,\#amigos) 1
1
% set player(kick,#amigos) 2
2
% foreach {key val} [array get player] { puts "$key => $val" }
kick,#amigos => 2

Non seulement ça passe, mais en plus tcl ne fait pas de différence entre le fait que le caractère soit échappé ou pas.

@GaMbiTo : can you try the new version (same url : https://gitlab.com/tcl-scripts/games/bla...ckjack.tcl)
zeolia: tchat gratuit, sans inscription ni publicité
Merci de ne pas demander d'aide en MP
Away


Forum Jump:


Users browsing this thread: 1 Guest(s)