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

Script error or something


LIlCheatah
 Share

Recommended Posts

Here:

```
''''This is in Sub Commands''''
      Case "/showhs"
Call ShowHS(Index)
Case Else

Call PlayerMsg(Index, "That is not a valid command.", BRIGHTRED)
End Select

End Sub

Sub ShowHS(Index)
          Dim Highscore
          Dim HighscoreName
          Dim HighscoreKills
          Highscore = 1
          CMI = 1
          Y = 100
  Call PlayerMsg(Index, "Workin'", Brightgreen)
            Do While Highscore < 51
HighscoreName = GetVar("/scripts/pvp.ini", "Highscore", Highscore
HighscoreKills = Int(GetVar("/scripts/pvp.ini", HighscoreName, "Kills"))
Call PlayerMsg(Index, "Processing, highscore = " & Highscore & " highscore kills = " & HighscoreKills & " highscore name = " & HighscoreName & " .", BRIGHTGREEN)
If Highscore = 1 Then
Call CustomMenuShow(Index, "/GUI/Custom/Highscore.png", 1)
End If
Call CustomMenuLabel(Index, CMI, Highscore & ": " & HighscoreName & HighscoreKills , 200, Y, 10, 0, 0, 400, 20)
Highscore = Highscore + 1
CMI = CMI + 1
Y = Y + 20
  Loop
End Sub

```
Link to comment
Share on other sites

@[SB:

> Cheatah link=topic=41052.msg405523#msg405523 date=1237842156]
> I didn't change anything, and it's for a costum menu.

Sorry, but no shit.

How far does the script run before stopping? Does the menu show, does it show you any messages? Does it do ANYTHING?
Link to comment
Share on other sites

@[Emblem:

> link=topic=41052.msg405525#msg405525 date=1237842259]
>
> How far does the script run before stopping?

Answer all questions..

But you might have misplaced some of the subs, or the script is wrong. I wish someone would code an error checker into the Sadscript editor.

-Alpha
Link to comment
Share on other sites

```
''''This is in Sub Commands''''
          Case "/showhs"
        Call ShowHS(Index)
      Case Else

        Call PlayerMsg(Index, "That is not a valid command.", BRIGHTRED)
  End Select

End Sub

Sub ShowHS(Index)
Dim Highscore
Dim HighscoreName
Dim HighscoreKills

    Highscore = 1
    CMI = 1
    Y = 100
    Call PlayerMsg(Index, "Workin'", Brightgreen)
    Do While Highscore < 51
        HighscoreName = GetVar("/scripts/pvp.ini", "Highscore", Highscore)
        HighscoreKills = Int(GetVar("/scripts/pvp.ini", HighscoreName, "Kills"))
        Call PlayerMsg(Index, "Processing, highscore = " & Highscore & " highscore kills = " & HighscoreKills & " highscore name = " & HighscoreName & " .", BRIGHTGREEN)
If Highscore = 1 Then
            Call CustomMenuShow(Index, "/GUI/Custom/Highscore.png", 1)
        End If
        Call CustomMenuLabel(Index, CMI, Highscore & ": " & HighscoreName & " " & HighscoreKills , 200, Y, 10, 0, 0, 400, 20)
        Highscore = Highscore + 1
        CMI = CMI + 1
        Y = Y + 20
    Loop
End Sub

```
Try now.
(Missing ")" on 1st GetVar)
Link to comment
Share on other sites

Case "/showhs"
You missed an exit sub.

HighscoreName = GetVar("/scripts/pvp.ini", "Highscore", Highscore
You are missing a )

```
''''This is in Sub Commands''''
Case "/showhs"
Call ShowHS(Index)
Exit Sub

Case Else
Call PlayerMsg(Index, "That is not a valid command.", BRIGHTRED)
  End Select
End Sub

Sub ShowHS(Index)
Dim Highscore
Dim HighscoreName
Dim HighscoreKills
Highscore = 1
CMI = 1
Y = 100
Call PlayerMsg(Index, "Workin'", Brightgreen)
Do While Highscore < 51
HighscoreName = GetVar("/scripts/pvp.ini", "Highscore", Highscore)
HighscoreKills = Int(GetVar("/scripts/pvp.ini", HighscoreName, "Kills"))
Call PlayerMsg(Index, "Processing, highscore = " & Highscore & " highscore kills = " & HighscoreKills & " highscore name = " & HighscoreName & " .", BRIGHTGREEN)
If Highscore = 1 Then
Call CustomMenuShow(Index, "/GUI/Custom/Highscore.png", 1)
End If
Call CustomMenuLabel(Index, CMI, Highscore & ": " & HighscoreName & HighscoreKills , 200, Y, 10, 0, 0, 400, 20)
Highscore = Highscore + 1
CMI = CMI + 1
Y = Y + 20
Loop
End Sub

```
Link to comment
Share on other sites

```
''''This is in Sub Commands''''
          Case "/showhs"
        Call ShowHS(Index)
      Case Else

        Call PlayerMsg(Index, "That is not a valid command.", BRIGHTRED)
  End Select

End Sub

Sub ShowHS(Index)
Dim Highscore
Dim HighscoreName
Dim HighscoreKills

    Highscore = 1
    CMI = 1
    Y = 100
    Call PlayerMsg(Index, "Workin'", Brightgreen)
    If Highscore < 51
        HighscoreName = GetVar("/scripts/pvp.ini", "Highscore", Highscore)
        HighscoreKills = Int(GetVar("/scripts/pvp.ini", HighscoreName, "Kills"))
        Call PlayerMsg(Index, "Processing, highscore = " & Highscore & " highscore kills = " & HighscoreKills & " highscore name = " & HighscoreName & " .", BRIGHTGREEN)
            Call CustomMenuShow(Index, "/GUI/Custom/Highscore.png", 1)
        Call CustomMenuLabel(Index, CMI, Highscore & ": " & HighscoreName & " " & HighscoreKills , 200, Y, 10, 0, 0, 400, 20)
        Highscore = Highscore + 1
        CMI = CMI + 1
        Y = Y + 20
End If
    Loop
End Sub

```
Link to comment
Share on other sites

You've been repeating the same thing over and over.. When is this going to be fixed??

```
          Case "/showhs"
        Call ShowHS(Index)
      Case Else

        Call PlayerMsg(Index, "That is not a valid command.", BRIGHTRED)
  End Select

End Sub

Sub ShowHS(Index)
Dim Highscore
Dim HighscoreName
Dim HighscoreKills

    Highscore = 1
    CMI = 1
    Y = 100
    Call PlayerMsg(Index, "Workin'", Brightgreen)
    If Highscore < 51
        HighscoreName = GetVar("/scripts/pvp.ini", "Highscore", Highscore)
        HighscoreKills = Int(GetVar("/scripts/pvp.ini", HighscoreName, "Kills"))
        Call PlayerMsg(Index, "Processing, highscore = " & Highscore & " highscore kills = " & HighscoreKills & " highscore name = " & HighscoreName & " .", BRIGHTGREEN)
            Call CustomMenuShow(Index, "/GUI/Custom/Highscore.png", 1)
        Call CustomMenuLabel(Index, CMI, Highscore & ": " & HighscoreName & " " & HighscoreKills , 200, Y, 10, 0, 0, 400, 20)
        Highscore = Highscore + 1
        CMI = CMI + 1
        Y = Y + 20
End If
    Loop
End Sub

```
You sure you weren't putting the ""This Is In Sub Commands"" in the script?..

-Alpha
Link to comment
Share on other sites

        HighscoreName = GetVar("/scripts/pvp.ini", "Highscore", Highscore)
        HighscoreKills = Int(GetVar("/scripts/pvp.ini", HighscoreName, "Kills"))

Your missing quotations. ("")

Call CustomMenuShow(Index, "/GUI/Custom/Highscore.png", 1)
Missing a ttle.
Call CustomMenuShow(Index, "Needs a name.", "/GUI/Custom/Highscore.png", 1)
Link to comment
Share on other sites

@[NW:

> [AFRO] Sean link=topic=41052.msg406612#msg406612 date=1237996213]
>         HighscoreName = GetVar("/scripts/pvp.ini", "Highscore", Highscore)
>         HighscoreKills = Int(GetVar("/scripts/pvp.ini", HighscoreName, "Kills"))
>
> Your missing quotations. ("")
>
> Call CustomMenuShow(Index, "/GUI/Custom/Highscore.png", 1)
> Missing a ttle.
> Call CustomMenuShow(Index, "Needs a name.", "/GUI/Custom/Highscore.png", 1)

So HighscoreName = GetVar("/scripts/pvp.ini", "Highscore", Highscore)
must be HighscoreKills = Int(GetVar("/scripts/pvp.ini", HighscoreName, "Kills"))?

And Call CustomMenuShow(Index, "/GUI/Custom/Highscore.png", 1)
Must be Call CustomMenuShow(Index, "Needs a name.", "/GUI/Custom/Highscore.png", 1)?
Link to comment
Share on other sites

@[SB:

> Cheatah link=topic=41052.msg406616#msg406616 date=1237996794]
>
> So HighscoreName = GetVar("/scripts/pvp.ini", "Highscore", Highscore)
> must be HighscoreKills = Int(GetVar("/scripts/pvp.ini", HighscoreName, "Kills"))?

No those are 2 lines of YOUR vode that are missing ""
change
HighscoreName = GetVar("/scripts/pvp.ini", "Highscore", Highscore)
To
HighscoreName = GetVar("/scripts/pvp.ini", "Highscore", "Highscore")
And
HighscoreKills = Int(GetVar("/scripts/pvp.ini", HighscoreName, "Kills"))?
To
HighscoreKills = Int(GetVar("/scripts/pvp.ini", "HighscoreName", "Kills"))?

@[SB:

> Cheatah link=topic=41052.msg406616#msg406616 date=1237996794]
> And Call CustomMenuShow(Index, "/GUI/Custom/Highscore.png", 1)
> Must be Call CustomMenuShow(Index, "Needs a name.", "/GUI/Custom/Highscore.png", 1)?

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