Re: All of your stupid embarrassing coding mistakes! -
Calgon - 14.08.2012
When a player connected to the server, their name is checked in the bans file, but I accidentally removed GetPlayerName while making an anti-hack check and about ~60 players were all kicked and falsely auto banned.
This was a few months ago, probably my most embarrassing mistake, but it was all fixed after a few minutes, luckily nothing even saved to the ban file, it just kicked everyone because it was searching the bans file for literally nothing, so it found nothing and kicked everyone who connected.
Re: All of your stupid embarrassing coding mistakes! -
Roperr - 14.08.2012
Probably the biggest mistake I made was making an infinite loop which made the CPU usage go up to 100% and crashed our old VPS we had
Actually I did that twice :P
Re: All of your stupid embarrassing coding mistakes! -
ReneG - 18.08.2012
pawn Код:
enum pinfo
{
Float:pos[3];
}
new data[MAX_PLAYERS][pinfo];
// I always make this mistake.
GetPlayerPos(playerid, data[playerid][pos[0]], data[playerid][pos[1]], data[playerid][pos[2]]);
Re: All of your stupid embarrassing coding mistakes! - HuSs3n - 20.08.2012
i once used createvehicle inside a loop
and thats the result
dumper rain :HELLYEAH:
Re : All of your stupid embarrassing coding mistakes! -
ricardo178 - 20.08.2012
GivePlayerMoney(playerid +ammount); for the win....
Re: All of your stupid embarrassing coding mistakes! -
Sinner - 21.08.2012
I did this a few times:
pawn Код:
new variable = 153;
while(variable > 0) {
// Do something here
// and forgets to decrement the variable
// infinite loop O_o
}
Re: All of your stupid embarrassing coding mistakes! -
JaKe Elite - 21.08.2012
I was blind with this one on my /changename
pawn Код:
dini_Set(DataPath(location), "Admin", pData[playerid][Admin]);
i didn't knew about this so i was confuse about the result on the .ini
i check the code, i saw that it was in dini_Set, i must use dini_IntSet because pData - Admin is integer not string
another is with my saving/load pos system.
my global variable array Pos must be in float tag, i forgot to add it.
when i add SetPlayerPos(playerid, Pos[0], etc...
it endup with warning tag mismatch.
Re: All of your stupid embarrassing coding mistakes! -
FireCat - 22.08.2012
Quote:
Originally Posted by Sinner
I did this a few times:
pawn Код:
new variable = 153; while(variable > 0) { // Do something here // and forgets to decrement the variable // infinite loop O_o }
|
Tipical you!
Re: All of your stupid embarrassing coding mistakes! -
Kar - 22.08.2012
well last night I was so dumb x_X
I was making a anti team kill and I made it check if the team who shot was the same as the rival team of the other player to not damage them
Re: All of your stupid embarrassing coding mistakes! -
[HLF]Southclaw - 22.08.2012
Haha, I did something similar once, I made weapons subtract negative damage from the target player, which healed them!
Re: All of your stupid embarrassing coding mistakes! -
Patrik356b - 22.08.2012
Not mine, but ugh:
Код:
new IconID=1;
mysql_function_query(SQL_Connection, "SELECT * FROM `icons`", true, "IconLoad", "i", "IconID");
Re: All of your stupid embarrassing coding mistakes! -
milanosie - 22.08.2012
pawn Код:
stock ShowPlayerDialogEx(playerid, dialogid, style, caption[], info[], button1[], button2[])
{
P_Dialog[playerid] = dialogid
ShowPlayerDialogEx(playerid, dialogid, style, caption[], info[], button1[], button2[]);
return 1;
}
Now you tell me what is going to happen, I did it once-.-
dumb mistake
Re: All of your stupid embarrassing coding mistakes! -
2KY - 22.08.2012
Quote:
Originally Posted by [HLF]Southclaw
Okay, I just fixed a DAMN ANNOYING (but incredibly newbie stupid) bug.
I spent about 2 hours this morning trying to work out why file loaded vehicles weren't spawning or their coordinates weren't working in IsPointInDynamicArea.
Forgot 'Float:' on coordinate variables.
![Picard](images/smilies/picard2.png)
|
I do this constantly. lol
Re: All of your stupid embarrassing coding mistakes! -
=WoR=G4M3Ov3r - 22.08.2012
Quote:
Originally Posted by ricardo178
GivePlayerMoney(playerid +ammount); for the win....
|
I've done the same shit
new amount;
code
GivePlayerCash(playerid, +amount)
I forgot that GivePlayerCash was positive lol and I stayed for hours checking on what was the error due to. Found out and facepalmed.
Or I forget a ; after return