|
-
Mar 17th, 2000, 08:40 PM
#1
Thread Starter
New Member
Hi there, any help would be much appreciated...
i'm programming the network code for a game, and i need to send user defined types using the vb winsock (6.0) control. the senddata function won't let me send a type, it says 'Only public user defined types defined in public object modules can be used as parameters or return types for public procedures of class modules or as fields of public user defined types'
apparently there's some way to do this using a byte array, but i have no idea how...
thanks again
pete
www.cintelsoftware.co.uk
-
Mar 18th, 2000, 08:00 PM
#2
Hyperactive Member
hmmmmm i wonder who you could be 
urghhh byte array?
ur not doing net in a class are u?
BTW, sII building is 1/2 in
buzzwords are the language of fools
-
Mar 19th, 2000, 10:22 PM
#3
New Member
i ran into this too. i had never come across the fact that you can only send standard types until i had almost finsihed a network game (i made the game work as one player then worried about the network part).
pissed me right off, had to rewrite half the game and still haven't gotten it working well.
as far as i have been able to find, you can only send standard types and theres no way to force it.
the way i did it (im sure there is a better one) was to make two functions that would convert the type to a string and back again. the extra processing killed the game, but it worked.
another thing i did on a different game was make the data_arrival recieve a sort of "script" (the first 3 characters coming in are "mov" so it knows the next x characters are for moving the character. all kinds of fun stuff like that.
hope something in this mess helps a little
-
Mar 20th, 2000, 02:24 AM
#4
PowerPoster
-
Mar 20th, 2000, 06:43 AM
#5
Hyperactive Member
yeah, that's what he's doing at the moment (we're working on the same game ). But it's soooo much repeated code 
We're thinking of using DirectPlay..
buzzwords are the language of fools
-
Mar 20th, 2000, 11:49 AM
#6
PowerPoster
Uh, good luck I heared that DPlay is very difficult to use (at least in C)...
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
|