Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SetAcccess Button on Server
#1
I added Binary accounts, and I wanted to make a button on my server that gave the Name in the textbox access level 4.

Now I get a runtime error 13 with this piece of code:

[code]Private Sub GiveAdmin_Click()
Call SetPlayerAccess(frmServer.txtGiveAdminName, 4) '
Reply
#2
This should be pretty simple. I'll play around with it when I get off work if no one else has replied by then.
Reply
#3
Dave Wrote:If I'm not mistaken, setAccess does so with the index number, and not the char/account name.
If I remember correctly, findPlayer takes a CHARACTER name and turns it into an index.

look into it.

How can I use the Indexnumber findplayer returns in my Call SetPlayerAcces(index, access) line then?

EDIT: NVM got it now.

For how I fixed it, this is my code now:

Code:
Private Sub GiveAdmin_Click()
Dim i As Long
i = FindPlayer(frmServer.txtGiveAdminName.Text)

    Call SetPlayerAccess(i, 7)
    Call TextAdd(frmServer.txtText, txtGiveAdminName.Text & "had been given acces level 7!", True)
    
End Sub

U were right Dave, ty for pointing that out.
Reply
#4
Dave Wrote:Pretty good of me for working off over a year old memories XD

I was gonna suggest the same thing, also that in the first code he posted, he didn't have the .text after the text box name. Tongue
Reply
#5
Perfekt Wrote:
Dave Wrote:Pretty good of me for working off over a year old memories XD

I was gonna suggest the same thing, also that in the first code he posted, he didn't have the .text after the text box name. Tongue
I don't think the .text is really needed actually. Not 100% sure though.
Reply
#6
It is ,, Otherwise it doesn't check the property (w/e u spell it) Text, where u need to place the name of the one u want to make admin.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)