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


Pièces jointes
.tcl   blackjack.tcl (Taille : 16.78 Ko / Téléchargements : 3)
  Répondre
#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.
  Répondre
#3
(28/05/2020, 13:22)CrazyCat a écrit : 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}"
  Répondre
#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 :)
  Répondre
#5
no problem brother, I have time, take yours;). make it quiet
  Répondre
#6
Bonsoir, le blackjack est disponile en français ?
  Répondre
#7
Pas que je sache.
La seule version que je connaisse est celle fournie par GaMbiTo et qui ne fonctionne pas pour l'instant.
  Répondre
#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.
  Répondre
#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}"
  Répondre
#10
(11/06/2020, 05:47)GaMbiTo a écrit : 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..
  Répondre
#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)
  Répondre


Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)