adamsharp Posted August 9, 2009 Author Share Posted August 9, 2009 Hey Its Me And Ive Got 2 Commands That I need Debugging thanks```Case "/get 4 25"If CanTake(Index, 1, 25) = True Then Dim G4 G4 = Rand(1,6) If G4 = 4 Then Call PlayerMsg(index, "Well done You Win" Call GivePlayerItem(Index, 1, 75) Else Call TakeItem(Index, 1, 25) Exit Sub```And```Case "/money"If GetPlayerAccess(Index) > 0 ThenCall GivePlayerItem(Index, 1, 1000)Exit Sub```Thanks, Adamsharp. Link to comment Share on other sites More sharing options...
Owen F Posted August 9, 2009 Share Posted August 9, 2009 ```case "/get425 Dim G4 G4 = Rand(1,6)If CanTake(Index, 1, 25) = True Then If G4 = 4 Then Call PlayerMsg(index, "Well done You Win" Call GivePlayerItem(Index, 1, 75)EndIfExit Sub Else Call TakeItem(Index, 1, 25)EndIf Exit Sub```Should work```Case "/money"If GetPlayerAccess(index) > 0 Thencall GiveCurrency(index, 1, 1000)EndIfExit SubElseCall PlayerMsg(index,"You are not high enough access to do this!",0)EndIfExit Sub```Should work. Link to comment Share on other sites More sharing options...
Bobosk Posted August 9, 2009 Share Posted August 9, 2009 ```Case "/get425" Dim G4 G4 = Rand(1,6)If CanTake(Index, 1, 25) = True Then If G4 = 4 Then Call PlayerMsg(index, "Well done You Win", 10) Call GiveCurrency(Index, 1, 75) Else Call TakeItem(Index, 1, 25) Exit Sub End IfElse Call PlayerMsg(Index, "You need 25 Currency to gamble!", 12)End If``` Link to comment Share on other sites More sharing options...
Owen F Posted August 9, 2009 Share Posted August 9, 2009 both of us forgot to end the ifo.O Link to comment Share on other sites More sharing options...
xelander Posted August 9, 2009 Share Posted August 9, 2009 ```Case "/get425" Dim G4 G4 = Rand(1,6)If CanTake(Index, 1, 25) Then If G4 = 4 Then Call PlayerMsg(index, "Well done You Win", 10) Call GiveCurrency(Index, 1, 75) Else Call TakeItem(Index, 1, 25) End IfElse Call PlayerMsg(Index, "You need 25 Currency to gamble!", 12)End IfExit Sub```CanTake is automaticly if its true it gives a value of 1, so no need the "= True" 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