Dialog Response
#4

Quote:
Originally Posted by Sjn
Посмотреть сообщение
Wouldn't doing new weaponid = strval(inputtext); just work fine? I've been doing this directly and have no issues. Though, sscanf could be a better choice.
strval will return 0 if the text doesn't contain only numbers. Checking if the index 0 and 1 are equal to '0' and '\0' respectively is not something people would do and sscanf is really much easier to use.
Reply


Messages In This Thread
removed - by TracerX - 13.07.2016, 15:23
Re: Dialog Response - by Stinged - 13.07.2016, 15:59
Re: Dialog Response - by Sjn - 13.07.2016, 16:07
Re: Dialog Response - by Konstantinos - 13.07.2016, 16:15
Re: Dialog Response - by Sjn - 13.07.2016, 16:20
Re: Dialog Response - by NaS - 13.07.2016, 16:29

Forum Jump:


Users browsing this thread: 1 Guest(s)