ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
VB prob: run-time error 450 (Sdk)
VB prob: run-time error 450 // SdkkahFeb 16, 2001, 8:43pm
I'm making a new bot (in VB) for the new create light command in AW 3.1.
Usually, I make stand-alone bots that won't be publicly available anyway, so I only test it myself before releasing it, but since this bot is gonna be a public MBE/KAHBOT release, I have started a closed beta. Now, the testers all got run-time error 450, but I don't get it. The VB reference didn't help much, so I'm asking you guys what it really means (the stuff in the reference is quite weird) and how I can fix it. Because I don't get the error, I don't know where it is. KAH lanezeriFeb 16, 2001, 10:21pm
Run-Time errors are coding problems.. check that.. I dont know the number
errors tho.. but I do know Run-Time refers to the code.. grimbleFeb 17, 2001, 5:36am
Run-time errors are simply errors that weren't (or couldn't be) picked up at
compile time. Quite often they are caused by trying to use different interfaces (for example, to ActiveX components) than the ones expected at design time. As far as AwSdkOcx2 not being found, this is why VB ships with the Application Setup Wizard ... you identify all the dependencies and the VB ASW packages all the right components from your machine into a distributable package (Set Up program, CAB, etc). VB applications need too much in the way of infrastructure components to safely distribute as an executable alone. At the end of the day, the one thing Run-Time errors DO indicate is that there is insufficient error trapping one of the components, whether it is your code or someone elses. A Runtime 450 indicates a call to a procedure or member function with the wrong number of arguments (a classic symptom of having the wrong ActiveX interface installed) or you are trying to get/set a property that doesn't support that activity (like trying to set a read-only property on a control). Make a SetUp package and distribute your application that way to ensure you avoid this type of problem. If you package it up properly, identifying all the components that YOUR CODE needs, then AwSdkOcx2 will be shipped with your application. I believe there is not a dependency file for AwSdkOcx so you need to remember to include aw.dll in the package manually. You'll end up with at least a 2MB distributable package, but then that's VB for you. If you stick a Jet database call (to MS Access for example) into your code, that package size will jump to around 3.5MB - 4MB. That's the payback for the ease of use you get with VB. Grims. [View Quote] kahFeb 17, 2001, 11:39am
well, I actually tryed to make a setup, but it couldn't find AwSdkOcx2's
dependencies and I tought hat there was no point to make a setup app then. So if anybody knows how to fix that, please contact me :-)) KAH [View Quote] lanezeriFeb 17, 2001, 4:53pm
LOL.. it asks if you want it to have dependencies.. and it asks if you want
it to be shared.. nothing to worry about :o] grimbleFeb 17, 2001, 9:49pm
Like I said, there isn't a dependency file for AwSdkOcx2, so you need to add
aw.dll manually to the package. Unless you distribute the components you use from your machine, you aren't going to guarantee avoiding these types of errors. Its your choice at the end of the day ... distribute YOUR components or risk runtime errors. Good luck whichever way you try. Grims. [View Quote] kahFeb 18, 2001, 4:55pm
thanx :-)) another VB programmer that is on the beta team got the error with
the exe, but the source-code worked fine...it's a pretty weird problem... KAH [View Quote] tony56Feb 18, 2001, 9:59pm
If you think you know the part of the code that's giving you trouble,
try this: Sub (subnameandotherstuffgoeshere) On Error Resume Next .... code ... If Error Then MsgBox "Error in sub (subname): code=" & Error & ", " & Error.Description End Sub -- - Tony56 (Tony M.) [chandler56 at mail.com] "All typos are optical illusions" ____________________________________________________________ [View Quote] the derekFeb 19, 2001, 10:21pm
run time 450 is Wrong number of arguments or invalid property assignment. now
this should be picked up at compile time.... but... [View Quote] > I'm making a new bot (in VB) for the new create light command in AW 3.1. > Usually, I make stand-alone bots that won't be publicly available anyway, so > I only test it myself before releasing it, but since this bot is gonna be a > public MBE/KAHBOT release, I have started a closed beta. Now, the testers > all got run-time error 450, but I don't get it. The VB reference didn't help > much, so I'm asking you guys what it really means (the stuff in the > reference is quite weird) and how I can fix it. Because I don't get the > error, I don't know where it is. > > KAH kahFeb 20, 2001, 11:39am
works now...with the setup thingy...even if one of the testers got it again
after one error free build... KAH PS. Shouldn't be too long before I release it [View Quote] |