| Mirage Source http://www.miragesource.net/forums/ |
|
| SetAcccess Button on Server http://www.miragesource.net/forums/viewtopic.php?f=201&t=2790 |
Page 1 of 1 |
| Author: | Styre [ Wed Oct 03, 2007 7:37 pm ] |
| Post subject: | SetAcccess Button on Server |
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) ' <---- error line Call TextAdd(frmServer.txtText, txtGiveAdminName.Text & "had been given acces level 7!", True) End Sub If I have this: Code: Private Sub GiveAdmin_Click() Call TextAdd(frmServer.txtText, txtGiveAdminName.Text & "had been given acces level 7!", True) End Sub It will put the text in the text box next to my button in the server text box. So what am I doing wrong? Is it syntax or just some dumb little thing that I'm overlooking? |
|
| Author: | Rian [ Wed Oct 03, 2007 7:45 pm ] |
| Post subject: | Re: SetAcccess Button on Server |
This should be pretty simple. I'll play around with it when I get off work if no one else has replied by then. |
|
| Author: | Lea [ Wed Oct 03, 2007 7:59 pm ] |
| Post subject: | Re: SetAcccess Button on Server |
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. |
|
| Author: | Styre [ Wed Oct 03, 2007 8:21 pm ] |
| Post subject: | Re: SetAcccess Button on Server |
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. |
|
| Author: | Lea [ Wed Oct 03, 2007 11:06 pm ] |
| Post subject: | Re: SetAcccess Button on Server |
Pretty good of me for working off over a year old memories XD |
|
| Author: | Matt [ Thu Oct 04, 2007 12:15 pm ] |
| Post subject: | Re: SetAcccess Button on Server |
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. |
|
| Author: | William [ Thu Oct 04, 2007 2:58 pm ] |
| Post subject: | Re: SetAcccess Button on Server |
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. I don't think the .text is really needed actually. Not 100% sure though. |
|
| Author: | Styre [ Thu Oct 04, 2007 3:00 pm ] |
| Post subject: | Re: SetAcccess Button on Server |
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. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|