Jump to content
  • 0
Sign in to follow this  
skander1345

[Broken x v2] [Gambling] Help please.

Question

Hey guys, i am using brokenx v2 source, i fixed the combat problems including the range and mage errors, but i got stuck at this gambling issue.

when i use the donator zone and gamble with the mode "five" and win, i get my items correctly. when i do it again and win again, it shows me the same items i won before, gives me other items, and disconnects me and these errors appear.

[code][8/21/11 2:09 AM]: java.lang.ArrayIndexOutOfBoundsException: 35
[8/21/11 2:09 AM]: at server.model.minigames.Gambling.addReward(Gambling.ja
va:61)
[8/21/11 2:09 AM]: at server.model.minigames.Gambling.rewardFive(Gambling.j
ava:46)
[8/21/11 2:09 AM]: at server.model.minigames.Gambling.playGame(Gambling.jav
a:26)
[8/21/11 2:09 AM]: at server.model.players.packets.ClickingButtons.processP
acket(ClickingButtons.java:720)
[8/21/11 2:09 AM]: at server.model.players.PacketHandler.processPacket(Pack
etHandler.java:137)
[8/21/11 2:09 AM]: at server.model.players.Client.processQueuedPackets(Clie
nt.java:1017)
[8/21/11 2:09 AM]: at server.model.players.PlayerHandler.process(PlayerHand
ler.java:140)
[8/21/11 2:09 AM]: at server.Server.main(Server.java:163)[/code]
any help is appreciated.

Share this post


Link to post
Share on other sites

24 answers to this question

Recommended Posts

  • 0
It's trying to give an item declared in one place, but isn't declared in another place.

Not going to spoonfeed. That should be enough information to help you out. ;D

Share this post


Link to post
Share on other sites
  • 0
alright, will try to find out what is the issue, but clear it up a little bit more please :)
i just started coding and know basics of java and how to fix simple things, but i am stuck :S

Share this post


Link to post
Share on other sites
  • 0
I Tried moving some voids, methods tweaked some codes.. no luck :s

Share this post


Link to post
Share on other sites
  • 0
[quote name='skander1345']I Tried moving some voids, methods tweaked some codes.. no luck :s[/QUOTE]

Moving things won't do anything.

The code looks at two things to figure out which items to give you. It finds an item on one list, that isn't on the other.

Share this post


Link to post
Share on other sites
  • 0
talking about this?
[code]public static int[][] randomPrize = {
{4151, 1333, 4087, 4585, 6916, 6918, 6920, 6922, 6924, 6926,
7362, 7364, 7366, 7368, 7370, 7372, 7374, 7376, 7378, 7380,
7382, 7384, 7386, 7388, 7390, 7392, 7394, 7396, 7398, 7399,
7400, -1},

{1305, 1377, 1434, 2583, 2585, 2587, 2589, 2591, 2593, 2595,
2597, 2599, 2601, 2603, 2605, 2607, 2609, 2611, 2613, 2615,
2617, 2619, 2621, 2623, 2625, 2627, 2629, 11732, 11730,
10705, 10330, 10332, 10334, 10336, 10338, 10340, 10342, 10344, 10346,
10348, 10350, 10352, -1},

{2631, 2633, 2635, 2637, 2639, 2641, 2643, 2645, 2647,
2649, 2651, 2653, 2655, 2657, 2659, 2661, 2663, 2665, 2667,
2669, 2671, 2673, 2675, 10354, 3481, 3483, 3485, 3486, 3488, -1},

{1060, 1066, 1080, 1094, 1114, 1216, 1334, 1518, 2441, 2443,
2437, 2435, 9244, 1713, 1616, 1320, 1713, 4151, 1333, 4087, 4585, 6916, 6918, 6920, 6922, 6924, 6926,
7362, 7364, 7366, 7368, 7370, 7372, 7374, 7376, 7378, 7380,
7382, 7384, 7386, 7388, 7390, 7392, 7394, 7396, 7398, 7399,
7400, 1305, 1377, 1434, 2583, 2585, 2587, 2589, 2591, 2593, 2595,
2597, 2599, 2601, 2603, 2605, 2607, 2609, 2611, 2613, 2615,
2617, 2619, 2621, 2623, 2625, 2627, 2629, 11283, 11732, 11730,
10705, 10330, 10332, 10334, 10336, 10338, 10340, 10342, 10344, 10346,
10348, 10350, 10352, 2631, 2633, 2635, 2637, 2639, 2641, 2643, 2645, 2647,
2649, 2651, 2653, 2655, 2657, 2659, 2661, 2663, 2665, 2667,
2669, 2671, 2673, 2675, 10354, 3481, 3483, 3485, 3486, 3488, -1}
};[/code]

there's two 1713's anyways. Edited by skander1345

Share this post


Link to post
Share on other sites
  • 0
It does this on my server, it's normal :D

Share this post


Link to post
Share on other sites
  • 0
yeah but it should have some fix somewhere, i tried my best, still i didn't get it. :s

Share this post


Link to post
Share on other sites
  • 0
I will do for a little bit of rsgp?

Share this post


Link to post
Share on other sites
  • 0
tell me how much, will think about it, but i am not sure if it should get paid anyways.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×