|
-
Jun 2nd, 2002, 02:14 PM
#1
Thread Starter
Lively Member
What thou...
Why does the caption keep coming up 0?
Sub SetPos()
PC.xpos = 0
PC.xview = 120
PC.ypos = 0
PC.yview = 120
frmGame.Caption = PC.yview
End Sub
Do you know if you will answer no to this question?
If we've never seen something happen, we can't know if its impossible.
If the soles of a shoe make faces at the floor when we don't look and isn't being watched via mirror or video tape, will we ever know?
If someone orders you to disobey all of their orders, do you obey or disobey?
-
Jun 2nd, 2002, 02:25 PM
#2
PowerPoster
You can surely say this function should work. So search your code for "Caption =" maybe you set the caption somewhere else, too.
-
Jun 2nd, 2002, 02:40 PM
#3
Thread Starter
Lively Member
I got it to work, but not how I like...
In module 1 -
Type PlayerChar
xpos As Integer
ypos As Integer
xview As Integer
yview As Integer
xvel As Integer
yvel As Integer
End Type
Global PC As PlayerChar
In module 2, I set the properties in that sub. But it doesnt work... how do I make it so that it still works even if they are in different modules?
Do you know if you will answer no to this question?
If we've never seen something happen, we can't know if its impossible.
If the soles of a shoe make faces at the floor when we don't look and isn't being watched via mirror or video tape, will we ever know?
If someone orders you to disobey all of their orders, do you obey or disobey?
-
Jun 2nd, 2002, 03:23 PM
#4
PowerPoster
There's nothing to do.. it should work. If you declared that variable in a public module you can access them from any other module or class... so there should be no problem.
-
Jun 2nd, 2002, 05:31 PM
#5
Addicted Member
Throw a CStr in there. Indirect conversion assignments are bad.
"1 4m 4 1337 #4xz0r!'
Janus
-
Jun 2nd, 2002, 07:01 PM
#6
PowerPoster
That already worked, Janus.
-
Jun 3rd, 2002, 06:23 PM
#7
Addicted Member
I know it worked, but he should still do explicit conversions nonetheless. It's good coding practice :P
"1 4m 4 1337 #4xz0r!'
Janus
-
Jun 4th, 2002, 05:49 PM
#8
Frenzied Member
Yeah VB gives us some really bad coding habits. I'm having a hard time getting used to C++ because of that 
Drakon, can you please post the code? There doesn't seem to be any problem with the part you're showing us, I'm sure it's somewhere else.
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
|