|
-
January 10th, 2000, 02:24 PM
#1
Class not working
Hi, it's me again.
I've created a bot class wich contains three other classes called Skill1, Skill4 and Skill5. I declare a variable like Dim myBot as cBot
set anarki = new cBot
. When I try to acces a property of myBot like myBot.skill1.botname = "somename"
then VB gives me the error "Object variable or With block variable not set". Can anybody please help me, I can't possibly figure ou what is wrong. If you want to have a look at the sourcecode (wich was too long to post here) you can try this download link http://botfactory.tripod.com/botfactoy.zip it's size is 558 KB. Thanks a lot
-
January 11th, 2000, 03:30 AM
#2
Re: Class not working
I see from your code :
>Dim myBot as cBot
>set anarki = new cBot
> When I try to acces a property of myBot like
>myBot.skill1.botname = "somename"
That you haven't actually assigned 'myBot' to anything.
Shouldn't it be :
Dim myBot as cBot
set myBot = new cBot
'
myBot.Skill1.BotName = "SomeName"
- If this isn't the problem, make sure that your 'cSkill' classes are being created in the cBot Class_Initialise routine.
I tried to download your code, but Tripod just says that the file can't be found.
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
-
January 11th, 2000, 11:32 AM
#3
Re: Class not working
Sorry, I made two mistakes. I mistyped the second name, it should have been Anarki. I'm aware of that fact. Second, the correct URL for the zipfile is <URL>http://botfactory.tripod.com/botfactory.zip[/URL]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|