sscanf - extracting ints from string (+REP)
#4

Quote:
Originally Posted by Galletziz
Посмотреть сообщение
I hope that i understand what you mean, try this:

pawn Код:
tmp_str[128];
sscanf(inputtext,"ii",s_ID,s_Pos);
format(tmp_str,sizeof(tmp_str),"The ID: %i, at Position: %i",s_ID, s_Pos);
SendClientMessage(playerid,-1,tmp_str);
Thats exactly what I did and it doesn't work...
Quote:
Originally Posted by Jefff
Посмотреть сообщение
Try

pawn Код:
sscanf(inputtext, "'ID:'p<,>i'Position:'i", s_ID, s_Pos);
or

pawn Код:
sscanf(inputtext, "{s[5]}p<,>i'Position:'i", s_ID, s_Pos);
Well this seem to work half-way but I'll take it. thank you. +Rep'ed
Reply


Messages In This Thread
sscanf - extracting ints from string (+REP) - by Itzhak E. - 01.12.2014, 13:30
Re: sscanf - extracting ints from string (+REP) - by Galletziz - 01.12.2014, 15:40
Re: sscanf - extracting ints from string (+REP) - by Jefff - 01.12.2014, 15:57
Re: sscanf - extracting ints from string (+REP) - by Itzhak E. - 01.12.2014, 19:09

Forum Jump:


Users browsing this thread: 1 Guest(s)