|
-
Apr 24th, 2002, 06:01 PM
#1
Thread Starter
Lively Member
Passing classes into a function
Lets say I've got a function, and i need it to do somthing to an instance of my class, and that is the parameter of the function. I'm trying to do somthing like this:
The function gets the .name property from the instance of the class and shows it in a msgbox (not what my function really does, but this makes it a bit more simple)
Function GetName (ClassInstance as string)
msgbox ClassInstance.Name
End Function
So when I call it like this supposing that Player1 is an instance of my class, it doesnt work.
Getname (Player1)
How can i get around this?
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
|