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

Need debug help


teh jimpie
 Share

Recommended Posts

```
Case "/spell"
slot = (Textsay(1))
spell = (Textsay(2))
If GetPlayerAccess(Index) = 5 Then
Call SetPlayerSpell(slot, spell)
Else
Call PlayerMsg(Index, "GTFO!", RED)
End If
Exit Sub

```
this should set your spell 'slot x' to 'spell number x' so you can cast the spell.
it doesnt work. can anybody help?
Link to comment
Share on other sites

```
      Case "/spell"
      slot = Textsay(1)     
      spell = Textsay(2)
        If GetPlayerAccess(Index) = 5 Then
        Call SetPlayerSpell(index, slot, spell)
        Else
        Call PlayerMsg(Index, "GTFO!", RED)
        End If
        Exit Sub     

```
You had parentheses around TextSay(1) and 2\. Also, SetPlayerSpell:

Call SetPlayerSpell(index, slot, spell)

You forgot the index.
Link to comment
Share on other sites

```
      Case "/spell"
      slot = Textsay(1)     
      spell = Textsay(2)
      Call SetPlayerSpell(index, slot, 0)
        If GetPlayerAccess(Index) = 5 Then
            Call SetPlayerSpell(index, slot, spell)
        Else
            Call PlayerMsg(Index, "GTFO!", RED)
        End If
        Exit Sub

```
Just setting it to zero and then running the rest.
Link to comment
Share on other sites

```
Case "/spell"
Slot = Textsay(1)     
Spell = Textsay(2)

If GetPlayerAccess(Index) = 5 Then
If GetPlayerSpell(Index, Slot) = 0 Then
Call SetPlayerSpell(Index, Slot, Spell)
Else
Call PlayerMsg(Index, "The slot is taken by another spell!", RED)
End If
Else
Call PlayerMsg(Index, "GTFO!", RED)
End If

Exit Sub
```

Regards,
  Godlord.
Link to comment
Share on other sites

lol nvm it doesnt work. it crashed my account  XD
it doesnt show any spells, just –- slot free --- but when i want to learn a spell it says, this slot is already taken. when i select a slot and click on 'forget' it says no spell here  XD
well, leave this  ;) thanks for helping.
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...