What's the problem here?
#1

Hello World.

When i want to use 10 in the inputtext it gives me error. But when i use 1 below 9 its okay. Why can't i use 10?



pawn Код:
if(inputtext[0] == '10')
Error:
pawn Код:
error 027: invalid character constant
Reply
#2

10 is 2 characters long hence using 2 cells ([0] and [1]).

Just do this

pawn Код:
if(strcmp(inputtext, "10", true, 2))
Reply
#3

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
10 is 2 characters long hence using 2 cells ([0] and [1]).

Just do this

pawn Код:
if(strcmp(inputtext, "10", true, 2))
Works. Thank you man.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)