adamsharp Posted August 9, 2009 Author Share Posted August 9, 2009 hey guys can you debugg these for me?```Case "/visitjail"Call PlayerWarp(Index,10,10,149)Exit Sub``````Case "/roll" Dim D1 D1 = Rand(1,100) Call MapMsg(GetPlayerMap(index), & GetPlayerName(index) & " Just Rolled " & D1 & " Out Of 100", BLUE)Exit Sub```Thanks AdamSharp Link to comment Share on other sites More sharing options...
IceCream Tuesday Posted August 9, 2009 Share Posted August 9, 2009 ```Call MapMsg(index, & GetPlayerName(index) & " Just Rolled " & D1 & " Out Of 100", BLUE)``` Link to comment Share on other sites More sharing options...
emblem Posted August 9, 2009 Share Posted August 9, 2009 @IceCream:> ```> Call MapMsg(index, & GetPlayerName(index) & " Just Rolled " & D1 & " Out Of 100", BLUE)> ``````Call MapMsg(index, GetPlayerName(index) & " Just Rolled " & D1 & " Out Of 100", BLUE)``` Link to comment Share on other sites More sharing options...
IceCream Tuesday Posted August 9, 2009 Share Posted August 9, 2009 ooh. missed the &You putting in the correct sub? Link to comment Share on other sites More sharing options...
adamsharp Posted August 9, 2009 Author Share Posted August 9, 2009 @IceCream:> ooh. missed the &> > You putting in the correct sub?im putting it just above /help```Case "/visitjail"Call PlayerWarp(Index,10,10,149)Exit SubCase "/roll" Dim D1 D1 = Rand(1,100) Call MapMsg(index, GetPlayerName(index) & " Just Rolled " & D1 & " Out Of 100", BLUE)Exit Sub Case "/help" Call PlayerMsg(Index, "Social Commands:", WHITE) Call PlayerMsg(Index, "'msghere = Broadcast Message", WHITE) Call PlayerMsg(Index, "-msghere = Emote Message", WHITE) Call PlayerMsg(Index, "!namehere msghere = Player Message", WHITE) Call PlayerMsg(Index, "Available Commands: /help, /info, /who, /fps, /inv, /stats, /train, /party, /join, /leave, /refresh", WHITE) Exit Sub ``` Link to comment Share on other sites More sharing options...
IceCream Tuesday Posted August 9, 2009 Share Posted August 9, 2009 lul. remove the Exit Sub's :D only should be an Exit Sub at the END of the sub. Link to comment Share on other sites More sharing options...
adamsharp Posted August 9, 2009 Author Share Posted August 9, 2009 huh? Link to comment Share on other sites More sharing options...
IceCream Tuesday Posted August 9, 2009 Share Posted August 9, 2009 post the whole thing. including the part that says sub bla bla bla(index) Link to comment Share on other sites More sharing options...
xelander Posted August 9, 2009 Share Posted August 9, 2009 Nope, its End sub in the end, use Exit sub else you will get furture errors. Link to comment Share on other sites More sharing options...
IceCream Tuesday Posted August 9, 2009 Share Posted August 9, 2009 eh.. gah.. your right. fuckin SS.. anyway.. post your whole sub. Link to comment Share on other sites More sharing options...
adamsharp Posted August 9, 2009 Author Share Posted August 9, 2009 ```' Executed whenever a slash command is sent to the server.Sub Commands(Index) Dim TextSay Dim PlayerID Dim MapNum ' Get the command and arguments from the cache. TextSay = Trim(GetVar("Scripts\Command.ini", "TEMP", "Text" & Index)) ' Split the command into an array. All arguments are seperated by spaces. TextSay = Split(TextSay) Select Case TextSay(0) Case "/testscripts" Call TestMain(Index) Exit Sub Case "/roll" Dim D1 D1 = Rand(1,100) Call MapMsg(GetPlayerMap(index), & GetPlayerName(index) & " Just Rolled " & D1 & " Out Of 100", BLUE) Exit Sub Case "/visitjail"Call PlayerWarp(Index,10,10,149)Exit Sub Case "/help" Call PlayerMsg(Index, "Social Commands:", WHITE) Call PlayerMsg(Index, "'msghere = Broadcast Message", WHITE) Call PlayerMsg(Index, "-msghere = Emote Message", WHITE) Call PlayerMsg(Index, "!namehere msghere = Player Message", WHITE) Call PlayerMsg(Index, "Available Commands: /help, /info, /who, /fps, /inv, /stats, /train, /party, /join, /leave, /refresh", WHITE) Exit Sub Case "/calladmins" If GetPlayerAccess(Index) = 0 Then Call AdminMsg(GetPlayerName(Index) & " needs your help!", BRIGHTGREEN) Else Call PlayerMsg(Index, "You are an admin! You cannot call for help!", BRIGHTGREEN) End If Exit Sub Case "/admin" If GetPlayerAccess(Index) > 0 Then Call PlayerMsg(Index, "Social Commands:", WHITE) Call PlayerMsg(Index, """msghere = Global Admin Message", WHITE) Call PlayerMsg(Index, "=msghere = Private Admin Message", WHITE) Call PlayerMsg(Index, "Available Commands: /admin, /loc, /mapeditor, /warpmeto, /warptome, /warpto, /setsprite, /mapreport, /kick, /ban, /edititem, /respawn, /editnpc, /motd, /editshop, /ban, /editspell", WHITE) End If Exit Sub Case "/warpmeto" If GetPlayerAccess(Index) > 0 Then PlayerID = FindPlayer(TextSay(1)) If PlayerID > 0 Then Call PlayerWarp(Index, GetPlayerMap(PlayerID), GetPlayerX(PlayerID), GetPlayerY(PlayerID)) Call PlayerMsg(Index, "You have been warped to " & GetPlayerName(PlayerID) & ".", BROWN) Else Call PlayerMsg(Index, "Player is not online.", WHITE) End If End If Exit Sub Case "/warptome" If GetPlayerAccess(Index) > 0 Then PlayerID = FindPlayer(TextSay(1)) If PlayerID > 0 Then Call PlayerWarp(PlayerID, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index)) Call PlayerMsg(PlayerID, "You have been warped to " & GetPlayerName(Index) & ".", BROWN) Else Call PlayerMsg(Index, "Player is not online.", WHITE) End If End If Exit Sub Case "/warpto" If GetPlayerAccess(Index) > 0 Then MapNum = TextSay(1) If MapNum > 0 And MapNum <= MAX_MAPS Then Call PlayerWarp(Index, MapNum, GetPlayerX(Index), GetPlayerY(Index)) Call PlayerMsg(Index, "You have been warped to map #" & MapNum & ".", BRIGHTBLUE) Else Call PlayerMsg(Index, "Invalid map number.", BRIGHTRED) End If End If Exit Sub End Select Call PlayerMsg(Index, "That is not a valid command.", BRIGHTRED)End Sub``` Link to comment Share on other sites More sharing options...
IceCream Tuesday Posted August 9, 2009 Share Posted August 9, 2009 Try this.. put the Dim D1 by the other dim's instead of inside the case.and change to thisCase "/roll"Dim D1D1 = Rand(1,100)Call MapMsg(index, GetPlayerName(index) & " Just Rolled " & D1 & " Out Of 100", BLUE)Exit Subif still doesn't work.. could be the Rand.. because i'm not entirely sure about random's in SS. Link to comment Share on other sites More sharing options...
Bobosk Posted August 10, 2009 Share Posted August 10, 2009 randoms work just fine, you don't use index for MAP MESSAGES… other than that your correction is fine >.> Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now