Posts: 737
Threads: 338
Joined: Jan 2013
Hi,
I found a poker system here -
https://sampforum.blast.hk/showthread.php?tid=419263. But there was wrote, there is some bug's. Maybe somebody, find where is bug, and can here give a right, and without bug code?
Posts: 451
Threads: 31
Joined: May 2012
Reputation:
0
I'll see what I can do for you.
Posts: 737
Threads: 338
Joined: Jan 2013
Thank you. Too i up this thread
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
I've looked that code over, it's designed very very poorly and will be always prone to many bugs because the author neglected the fact that you really need to create gamestate and playerstate conditions instead it's full of obfuscation and inadequate assumptions which will surely break game play.
You need to define every possible situation and the only way to do that using states then switch statements to make sure everything possible is defined this was simply not done so be warned there will always be a lot of issues.
Posts: 737
Threads: 338
Joined: Jan 2013
I don't understand what really, bad is and what i need to do....
Posts: 737
Threads: 338
Joined: Jan 2013
This poker where you gave, is not what i need. I need that poker where i give link in start topic, but just with bug fixes.. I don't think there is a lot of bug's, but maybe somewhere, and see them, i think somebody can do it, and show here code, how to fix, or maybe explane what place is bad of code, what need to change like that...
Posts: 737
Threads: 338
Joined: Jan 2013
Am upping this thread
Posts: 2,187
Threads: 81
Joined: Aug 2011
Reputation:
0
Honestly, the code that has been written, kind of sucks because it's not understandable at all. (The best code shouldn't even need comments) So I guess you're gonna have to go with some other FS or make your own. (No one has the time to go through all the confusing arrays and all that)
Posts: 737
Threads: 338
Joined: Jan 2013
Who can explane this code? what do that while?
Код:
stock BubbleSort(a[], size)
{
new tmp=0, bool:swapped;
do
{
swapped = false;
for(new i=1; i < size; i++) {
if(a[i-1] > a[i]) {
tmp = a[i];
a[i] = a[i-1];
a[i-1] = tmp;
swapped = true;
}
}
} while(swapped);
}