ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
My Bots.. (are back) (Bots)
My Bots.. (are back) // BotslanezeriAug 14, 2001, 6:36pm
I've tried making class files, even ran through 3 different books, none of
them tell me how to fix them.. it is just like Brant's problem.. I even used VB's built-in class creator thingy.. <start code> Public Property Get Item(vntIndexKey As Variant) As clsHolder Set Item = mCol(vntIndexKey) ' This is the line that is ALWAYS selected. End Property <end code> Any of u genius programmers gotta clue what it is? - - - - - - - - - - - - - - - - - - - - - - - - - Anyway for the purpose of this post.. Bank Bot: D: My BankBot is pretty much completed, the dang class files, and INI file Module don't work, but otherwise everything is good :-) S: 96% Tag Bot: D: My TagBox is done also, features to be added but can't add till the thing works, class files suck :-\ S: 84% Scrambler: D: My Scrambler is in the re-making, remember the "ScRaM!" bot? The newest version is being made since source code was lost. S: 1% kahAug 14, 2001, 8:21pm
builderzAug 14, 2001, 8:29pm
If all goes well, KAH, more ScRaM! sessions will be held in the world
Techno. Builderz Stuff-X - Bot & World Hosting Services http://aw.stuff-x.com/ PGP Key ID: 0xAC0E7073 (for non-commercial use) [View Quote] lanezeriAug 14, 2001, 9:52pm
Class Error:
When the avatar enters, I add it to the collection.. When it exits I remove it.. etc.. When someone chats, and it requires a whisper, I call: "Avatar(sdk.AwAvatarName).avSession" and it selects: "Set Item = mCol(vntIndexKey)" with error "Run-time error 5" which is "Invalid procedure call or argument".. [View Quote] grimbleAug 16, 2001, 2:48pm
OK, I am having to make some assumptions here, but I am guessing that
vntIndexKey is the session number that was returned from the Avatar(sdk.AwAvatarName).avSession call. If this is the case, then you're falling foul of the difference between collection KEYS and collection INDEXES. If you provide a string as the locator for a collection then its a KEY ... Set Item = mCol("Lanezeri") - locates the item you inserted with a key of "Lanezeri" If you provide a number as the locator then its an INDEX (like in an array) .... Set Item = mCol(3) - locates the third item in the collection. In VB6, you can now use string representations of numbers (i.e. "46739") as keys in collections, but in VB5 I don't think this was allowed and you had to put an alpha character on the front. So ... If you're using VB6, when inserting into, referencing or removing from the collection, instead of using the numeric value in a variant, explicitly convert it to a string with CStr(vntIndexKey). With VB5, I think you'll need to use something like "K" & CStr(vntIndexKey) or something like that as the key, again in all places you use the collection. Does this help?? If I'm on the wrong track, give me a little more info and I'll look again. When you're using variants, there's no way for me to see what data type (i.e. string or numeric) the value vntIndexKey is in the code. I've attached a tiny little example in VB6 to demonstrate. Grims. begin 666 Lanezeri Example 1.zip M4$L#!!0````(`+1D$"N!?="8PP$``"H$```+````9G)M36%I;BYF<FUU4E%/ MXS ,?J_4_V#U at 0,)3=L-$#SPL(URAVY;=W0;CRAMO"VZ-*G2%-B_QUG'M9UH M)"N*O\^?'=OK\#E^BN9PW>OW?6^,6Z% at />X]:I/!QF0S1F_?`X )RZW0"K[. M/5G at :(. at PJ5 97^CV.[L%SX<W%TWP"EN;!U\TV] 2YTW=(=7S; 7P>WN/W9U M<UL%3H7Z1V$B[2 at H3IG$NIYV00>P%FXKQY89N\H7NA"'+Q\B`7Z\",7U>P$/ MN&&EM+X7*NY[(VN-2$J+U+?7.<N0^,&Q=<$)_$OJA$E'BG.6.N8CDP6>L"8& MF66)[,(7!CFFDM'UQ(FS-.4I)?S(=8&\%HBJZ9%?BE10[;ZW,.*-$7VB56$A M_;N*EB%TG%%!73%";=WGZ#3CXS(!U_?7J6;\_,)!``\B at VP_T5)BVMH;)U6[ M:^J:R1*[LCJ:LQAM6_4>YOA^HN>L2>J-.*?-$(9^&2IK]L$E!,/ at >UJ,J5:\ MYOWLX"UWPC1HU<XYFQ7;L?Z H!ER/KAP?8,S./%>PEL2_8F4W)/&O,S0T#H_ MXP8-JA2#3CTG=1S8F4O>>GZ;BTCM;,=QMI,Y6RE)<X095 at [:<3=AW_L$4$L# M!!0````(`,1D$"L<>* at [H at $``(X"```4````3&%N97IE<FE%>&%M<&QE,2YV M8G!54DUOFT 0O2/Q'Q"^M)%B$1SU4(E#BDV*9# JQ#W$/2PPQ)OL!]H='#M5 M_WMW at :0J!YAYCYEY\W:K2P_1Y at RNDTC%HT[QC%"Q-%_7^0$=*! -1%>'^]]! M$(3![2JX-L'\BM^CZ;G]\F<1+H-%L(B_'GZF>5X=RHM&X*OPH+&5#,(ELGJQ MVVZ\NP$E)TBE<)T2B<*AC_QYNN\ZL>2<B'851K[)<L(A\K=$P!LHNCD3WC.X M,<1W8'TL!<(9TW7D!U-E;_K6##+9PH1EY%FJ/:CHQL143'% at %SQ1;23,J=64 MBD8!!X$S5H(Z at 2J'OI<*$\I 6]20MFZ<)2[O\A 48=Z:FG++:F]+.45H9U64 MC?M6UG'38]>CH=_^PQ)RDJHPT^G "R4_(?]LX=ALLJ?PNH9Z>$I%)RV8RSM& MB:;BR6;?Y"!:'1^A>1F;&]$=DZ\?0,(*207^R]?I_B-Y$,J60YL4X\[V/$;W M1HX at at B4GQ] <T!171P6D+4#MZF=HT$(9.><#KPW43:RVEKO.8U9ZE2)"D\:N MZTVN_IHL-]=, at 3[:/_\"4$L#!!0````(`,1D$"L>! at 1$* at ```#0````4```` M3&%N97IE<FE%>&%M<&QE,2YV8G=+*\KU3<S,4[!5,#'1`6-3,P, at P])(1R%* M1\'("()-C2V at N9 &6=>+ at !02P$"% `4````" "T9! K at 7W0F,,!```J! `` M"P`````````!`" `MH$`````9G)M36%I;BYF<FU02P$"% `4````" #$9! K M''BH.Z(!``".` at ``% `````````!`" `MH'L`0``3&%N97IE<FE%>&%M<&QE M,2YV8G!02P$"% `4````" #$9! K' at 8$1"H````T````% `````````!`" ` MMH' `P``3&%N97IE<FE%>&%M<&QE,2YV8G=02P4&``````,``P"]````' 0` #```` ` end themaskAug 16, 2001, 3:58pm
I thought it was gonna be in my world Builderz? = ) (its 20.. peeps. member?
= ) TheMask Stuff-X - Bot & World Hosting Services www.aw.stuff-x.com TheMask at stuff-x.com \ [View Quote] lanezeriAug 19, 2001, 4:46pm
Your world has nothing to do with my bots, the bot isn't a Stuff-X bot (yet)
so it would be held in Techno. [View Quote] lanezeriAug 19, 2001, 4:47pm
You lost me lol, Brant fixed his I think, thanks tho, maybe someone whom
knows what they are doing understands :-) [View Quote] grimbleAug 19, 2001, 5:16pm
Well if you ever want to use/reference collections, I think this is
something you should spend some time trying to understand. Its pretty fundamental stuff. [View Quote] |