sscanf warning: Format specifier does not match parameter count.
#1

How can i fix this ?Everytime i use my command this shows in server logs and the command is little bugged cause this
CMD:
PHP код:
if(sscanf(params"uis[64]"playerbslotcarsellingtoplayerprice)) return SendClientMessage(playeridCOLOR_WHITE"[Usage]: /sellmybusiness [playerid] [slot] [price]"); 
And everytime it gives random numbers for carsellingtoplayerprice
Reply
#2

Price should be integer and not a string.
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Price should be integer and not a string.
as he said
PHP код:
if(sscanf(params"uii[64]"playerbslotcarsellingtoplayerprice)) return SendClientMessage(playeridCOLOR_WHITE"[Usage]: /sellmybusiness [playerid] [slot] [price]"); 
Reply
#4

Quote:
Originally Posted by AroseKhanNaizi
Посмотреть сообщение
as he said
PHP код:
if(sscanf(params"uii[64]"playerbslotcarsellingtoplayerprice)) return SendClientMessage(playeridCOLOR_WHITE"[Usage]: /sellmybusiness [playerid] [slot] [price]"); 
The lenght in brackets is for strings so you've to remove it.

pawn Код:
new playerb, slot, carsellingtoplayerprice;
if(sscanf(params, "uii", playerb, slot, carsellingtoplayerprice)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /sellmybusiness [playerid] [slot] [price]");
Reply
#5

Thanks
Reply
#6

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
The lenght in brackets is for strings so you've to remove it.

pawn Код:
new playerb, slot, carsellingtoplayerprice;
if(sscanf(params, "uii", playerb, slot, carsellingtoplayerprice)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /sellmybusiness [playerid] [slot] [price]");
lol i did it once but when i remove the html code and changed it to php code for better colors forget to remove it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)