Can't figure out how to use strmid properly.
#1

Hello.

Код:
	new ID,dest[32];
	new src[32] = "/tocar 20";
	strmid(dest,src,6,strlen(dest));
	sscanf(dest, "i", ID);
	printf("tele id: '%s' '%d'",dest,ID);
Running this code shows that strmid copies nothing to destination string therefore sscanf cant work. However if I switch dest and src then dest will be full string. Could anyone point me out how can I copy just a number from that string?
Reply


Messages In This Thread
Can't figure out how to use strmid properly. - by scriptit - 04.01.2013, 22:07
Re: Can't figure out how to use strmid properly. - by Vince - 04.01.2013, 22:13
Re: Can't figure out how to use strmid properly. - by Grim_ - 04.01.2013, 22:32

Forum Jump:


Users browsing this thread: 2 Guest(s)