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

Prospekt Source /setaccess


Yosephe
 Share

Recommended Posts

Hi!

I'm using engine Prospekt Source. I try to give access through the server by command "/setaccess The Raven 4". It makes Run-time error 13 Type mismatch. My code looks like this:

Case "/setaccess"

If UBound(Command) < 1 Then

txtChat.Text = vbNullString

Exit Sub

End If

If UBound(Command) < 2 Then

txtChat.Text = vbNullString

Exit Sub

End If

If FindPlayer(Command(1)) > 0 Then

Call SetPlayerAccess(FindPlayer(Command(1)), CLng(Command(2)))

Call SendPlayerData(FindPlayer(Command(1)))

Else

TextAdd "Wrong name."

End If

I have no idea how could I fix this.
Link to comment
Share on other sites

>! answering your problem, it's the space in your name that is causing the error:
"/setaccess The Raven 4"
>!          0            1          2       3
    <- indexes
>! when it splits the command string into a string array this engine's code is meant to have the following order: command(0),name(1),access(2)
>! and the problem is that in this line:
>! ```
>! Call SetPlayerAccess(FindPlayer(Command(1)), CLng(Command(2)))
>! ```
it's using Raven
as the access level, which you can be certain isn't a number  xD
>! My solution is (and this was made out of my head, make a backup before trying)
>! change:
>! ```
>! If FindPlayer(Command(1)) > 0 Then
Call SetPlayerAccess(FindPlayer(Command(1)), CLng(Command(2)))
>! ```
to:
>! ```
>! Dim tmpname as String, l as Long
for l = 1 to UBound(Command) - 1
tmpname = tmpname & " " & Trim$(Command(l))
next
tmpname = Trim$(tmpname)
If FindPlayer(tmpname) > 0 Then
Call SetPlayerAccess(FindPlayer(tmpname), CLng(Command(UBound(Command))))
>! ```
Link to comment
Share on other sites

Thank you for answers!

Could you give me a advice? Which open-source DX8-rendering engine can hold more than 7 people?

To Slasher: Thanks, your script works.

EDIT: Now I try to make this command on client-side.. My code looks like this:

Case "/setaccess"

If GetPlayerAccess(MyIndex) < ADMIN_CREATOR Then GoTo continue

For l = 1 To UBound(Command) - 1

tmpname = tmpname & " " & Trim$(Command(l))

Next

tmpname = Trim$(tmpname)

If tmpname > 0 Then

SendSetAccess tmpname, CLng(Command(UBound(Command)))

End If

And if I try to give access to one word user or more word user, it writes error: 

The following error occured at "HandleKeyPresses" in 'modInput' at line 0.

Run-time error '13': Type mismatch.
Link to comment
Share on other sites

> Thank you for answers!
>
>  
>
> Could you give me a advice? Which open-source DX8-rendering engine can hold more than 7 people?
>
>  
>
> To Slasher: Thanks, your script works.
>
>  
>
> EDIT: Now I try to make this command on client-side.. My code looks like this:
>
>  
>
>  
>
> Case "/setaccess"
>
> If GetPlayerAccess(MyIndex) < ADMIN_CREATOR Then GoTo continue
>
> For l = 1 To UBound(Command) - 1
>
> tmpname = tmpname & " " & Trim$(Command(l))
>
> Next
>
> tmpname = Trim$(tmpname)
>
> If tmpname > 0 Then
>
> SendSetAccess tmpname, CLng(Command(UBound(Command)))
>
> End If
>
>  
>
> And if I try to give access to one word user or more word user, it writes error: 
>
> The following error occured at "HandleKeyPresses" in 'modInput' at line 0.
>
> Run-time error '13': Type mismatch.

use eo 3
Link to comment
Share on other sites

> Lets face it most eclipse games at the most wont get over 10 to 20 players so i would personally choose eclipse worlds or eo 3 as for prospekt source it can just go away cause it will never handle that man players

Prospekt could hold more players but it would require an over haul in the code.
Link to comment
Share on other sites

I have returned….technically... anywho, Your best bet would be to try any engine really. try the ones you find intriguing then choose one from the assortment of engines you have picked. then go from there, every engine is different so there's really no telling what to pick. choose what's best for you and go from there. If you need any help with some programming don't hesitate to message me or anyone else on here for that matter.

- Growlith1223
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...