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

Index not defined.


shadowwulf
 Share

Recommended Posts

this could also work  :cheesy::
replace Function Getplayername with this :
```
Function GetPlayerName(ByVal index As Long) As String
    Dim P1
    Dim P2
    GetPlayerName = Trim$(Player(index).Char(Player(index).CharNum).Name)
    P1 = GetPlayerName(index)
    P2 = GetPlayerTarget(index)
End Function
```
ok now you've unlocked 2 commands :P
```
Call GetPlayerName(P1) 'this is player one
Call GetPlayerName(P2) ' this is player 2
```if it doesn't work just tell me :P.
Link to comment
Share on other sites

yeah or you can do this lol:

```
Dim Targetp
Targetp = GetPlayerTarget(Index)
Call PutVar("Duelists\" & GetPlayerName(Targetp) & ".ini", "Party", "User2", GetPlayerName(Index))
Call PutVar("Duelists\" & GetPlayerName(Targetp) & ".ini", "Party", "User2-id", Int(Index))
Call PutVar("Duelists\" & GetPlayerName(Targetp) & ".ini", "Party", "User1", GetPlayerName(Targetp))
Call PutVar("Duelists\" & GetPlayerName(Targetp) & ".ini", "Party", "User1-id", Int(Targetp))

Call PutVar("Duelists\" & GetPlayerName(Index) & ".ini", "Party", "User2-id", Int(Index))
Call PutVar("Duelists\" & GetPlayerName(Index) & ".ini", "Party", "User2", GetPlayerName(Index))
Call PutVar("Duelists\" & GetPlayerName(Index) & ".ini", "Party", "User1", GetPlayerName(Targetp))
Call PutVar("Duelists\" & GetPlayerName(Index) & ".ini", "Party", "User1-id", Int(Targetp))

Call PutVar("Duelists\" & GetPlayerName(Targetp) & ".ini", "Party", "Party", "Yes")
Call PutVar("Duelists\" & GetPlayerName(Index) & ".ini", "Party", "Party", "Yes")
'Dim P1
'Dim P2
'P1 = GetVar("Duelists\" & GetVar("Duelists\" & GetPlayerName(index) & ".ini", "Party", "User1") & ".ini", "Party", "User1-id")
'P2 = GetVar("Duelists\" & GetVar("Duelists\" & GetPlayerName(index) & ".ini", "Party", "User1") & ".ini", "Party", "User2-id")
```
need a bit more but yours is shorter and better franky :).
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...