Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO 2.0] Fix level up security hole


Robin
 Share

Recommended Posts

  • 3 weeks later...
Still learning here, but I think I am misunderstanding the instructions. I assume the code would look like

```
If GetPlayerAccess(index) < 4 Then Exit Sub
Sub HandleRequestLevelUp(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
```
But if I do that the
```
If GetPlayerAccess(index) < 4 Then Exit Sub
```moves up to the previous sub.
Link to comment
Share on other sites

If GetPlayerAccess(index) < 4 Then Exit Sub

That code roughly translates into : If the player's admin access isn't sufficient, stop running this code. That's what Exit sub does. Exit sub does not move up to a previous sub or something like that.

edit

I misread your question

```
If GetPlayerAccess(index) < 4 Then Exit Sub
Sub HandleRequestLevelUp(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
```This is def wrong, like you say. It should look like
```

Sub HandleRequestLevelUp(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
If GetPlayerAccess(index) < 4 Then Exit Sub

```
Link to comment
Share on other sites

@Joost:

> If GetPlayerAccess(index) < 4 Then Exit Sub
>
> That code roughly translates into : If the player's admin access isn't sufficient, stop running this code. That's what Exit sub does. Exit sub does not move up to a previous sub or something like that.
>
> edit
>
> I misread your question
>
> ```
> If GetPlayerAccess(index) < 4 Then Exit Sub
> Sub HandleRequestLevelUp(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
> ```This is def wrong, like you say. It should look like
> ```
>
> Sub HandleRequestLevelUp(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
> If GetPlayerAccess(index) < 4 Then Exit Sub
>
> ```

Thank you kind sir, I thought I was misunderstanding the instructions.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...