I have a classfile called cBot. So I declare vars like
dim Anarki as new cBot
dim Sarge as new cBot
dim Xaero as new cBot


In my program I let the user choose any of these three (actually 32, but let's keep it simple) bots (computer-controlled players for the game quake3arena) and afterwards I want to load a text-file wich contains settings like name, speed and stuff. So i created a Function like this public Function ParseFile(filename as string, Botname as cBot)


I have done this because my parsing routine will be able to load the settings from the file and put them in Botname.name

and Botname.speed

, regardless if Botname is Anarki, Sarge or Xaero. But I keep getting a ByRef type mismatch. I think that's because when I call the ParseFile function I pass Botname as a string, obvious.

My Qustion is if there is anyway to do that thingie with the classfiles without getting errors.

And another question. What's the difference between the following code:
Dim Mybot as cBot
set Mybot = new cBot

and
Dim Mybot as new cBot

or is it both the same?
Thanks a lot.