01.02.2011, 16:24
Well what goes wrong? Does it show Invalid Skin ID or does it show Congratulations or what? You need to do provide some debug information if you need more help.
I did spot one problem immediately in your format function:
"inputtext" is a string, not an integer, therefore you need to convert it first using a function like strval before formatting it as an integer, like so:
You made this same error in your second format function in that snippet of code.
Additionally the size of your "name" array is madness, the maximum size for a player name in SA-MP is 24, so that's 31 wasted cells!
I did spot one problem immediately in your format function:
pawn Код:
format(SkinBuy, sizeof(SkinBuy),"SELECT * FROM `skins` WHERE `Skinid` = '%d' AND `Owner` = 'None'",inputtext);
pawn Код:
format(SkinBuy, sizeof(SkinBuy),"SELECT * FROM `skins` WHERE `Skinid` = '%d' AND `Owner` = 'None'",strval(inputtext));
Additionally the size of your "name" array is madness, the maximum size for a player name in SA-MP is 24, so that's 31 wasted cells!