Skin Help
#2

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:

pawn Код:
format(SkinBuy, sizeof(SkinBuy),"SELECT * FROM `skins` WHERE `Skinid` = '%d' AND `Owner` = 'None'",inputtext);
"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:

pawn Код:
format(SkinBuy, sizeof(SkinBuy),"SELECT * FROM `skins` WHERE `Skinid` = '%d' AND `Owner` = 'None'",strval(inputtext));
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!
Reply


Messages In This Thread
Skin Help - by Criss_Angel - 01.02.2011, 16:21
Re: Skin Help - by JaTochNietDan - 01.02.2011, 16:24
[No subject] - by Criss_Angel - 02.02.2011, 11:18
Re: Skin Help - by Criss_Angel - 02.02.2011, 15:26
Re: Skin Help - by Steven Paul - 02.02.2011, 15:30
Re: Skin Help - by Criss_Angel - 03.02.2011, 10:05

Forum Jump:


Users browsing this thread: 1 Guest(s)