ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Xelagot: Simple Scripting gone wrong (Bots)
Xelagot: Simple Scripting gone wrong // Botsgnu32Jul 23, 2005, 2:25am
Trying scripting for the first time
"[Head] Type=Script Version=2.0 [Settings] Origin=0.000n 0.000w 0.00a 0.0 Run [Script] OnChatEvent Chat Label MainLoop Goto MainLoop End Event Chat GetChatName $nam GetChatline $lin $cht = $nam ":" #9 $lin ConMsg 0 $cht EndEvent" This is my script as some might recognize as a simple chat relay script. It works ok, but it outputs this: Gnu32: h $cht It keeps showing the variable placeholder and not displaying results instead, what happened there? tony mJul 23, 2005, 3:07am
[View Quote]
> This is my script as some might recognize as a simple chat relay script.
> It works ok, but it outputs this: > Gnu32: h > $cht > > It keeps showing the variable placeholder and not displaying results instead, what happened there? All of those variables need to be declared... it didn't even work on mine. (version 3.610) "$cht =" also did not work as expected, but "Concat $cht" does. Fixed script: [Head] Type=Script Version=2.0 [Settings] Origin=0.000n 0.000w 0.00a 0.0 Run [Script] OnChatEvent Chat Label MainLoop Goto MainLoop End Event Chat var $cht, $nam, $lin GetChatName $nam GetChatline $lin Concat $cht $nam ":" #9 $lin ConMsg 0 $cht EndEvent |