[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.
Re: statements and operators
you tried changing the ">" to "<" ?
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
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
Re: [RESOLVED] statements and operators