|
-
May 22nd, 2007, 04:42 PM
#1
Thread Starter
Lively Member
[RESOLVED] statements and operators
Code:
nrep = User(index).Reputation / 3
If nrep > User(a).Reputation Then
frmMain.wsk(index).SendData Chr$(lgrey) & "you cannot attack him, hes too high ranked." & vbCrLf & vbCrLf & Chr$(0)
DoEvents
Exit Sub
End If
this code works so low ranked players cant aim high ranked players, but now i need help doing vice verca...so high ranked cant aim low ranked.
Last edited by troubleshoot; May 22nd, 2007 at 05:01 PM.
-
May 22nd, 2007, 05:03 PM
#2
PowerPoster
Re: statements and operators
you tried changing the ">" to "<" ?
Well, everyone else has been doing it :-)
Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
Expect more to come in future
If I have helped you, RATE ME! :-)
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
-
May 22nd, 2007, 05:11 PM
#3
Thread Starter
Lively Member
Re: statements and operators
ill try this
Code:
nrep = User(index).Reputation / 3
If nrep > User(a).Reputation Then
frmMain.wsk(index).SendData Chr$(lgrey) & "you cannot attack him, hes too high ranked." & vbCrLf & vbCrLf & Chr$(0)
elseif nrep = user(index).reputation * 3
if nrep < user(a).reputation then
frmMain.wsk(index).SendData Chr$(lgrey) & "you cannot attack him, hes ranked too low." & vbCrLf & vbCrLf & Chr$(0)
DoEvents
Exit Sub
End If
-
May 22nd, 2007, 05:39 PM
#4
Re: statements and operators
This is more structured.
Code:
nrep = user(Index).reputation / 3
Select Case nrep
Case Is > user(a).reputation
frmMain.wsk(Index).SendData Chr$(lgrey) & "you cannot attack him, hes too high ranked." & vbCrLf & vbCrLf & Chr$(0)
Case Is < user(a).reputation
frmMain.wsk(Index).SendData Chr$(lgrey) & "you cannot attack him, hes ranked too low." & vbCrLf & vbCrLf & Chr$(0)
Case Is = user(Index).reputation * 3
'what to do here?
End Select
-
May 23rd, 2007, 07:45 AM
#5
Thread Starter
Lively Member
Re: [RESOLVED] statements and operators
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
|