Wrong inputtext
#1

Hey, what is wrong on this fuction?
PHP код:
  if(dialogid == 43)
        {
        if(
response)
        {
        new 
text[128];
        
strmid(text,inputtext,0,128);
        if(
text="1");
        {
            
SendClientMessage(playeridBLUE"Test");
            return 
1;
        }
        }
        } 
And errors:
PHP код:
C:\Users\Gedas\Desktop\GLS-geras\gamemodes\ls.pwn(14202) : warning 211possibly unintended assignment
C
:\Users\Gedas\Desktop\GLS-geras\gamemodes\ls.pwn(14202) : error 036: empty statement
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase 
Reply
#2

14202 is line?
Reply
#3

if(text="1");
Reply
#4

try if(text[1] == '1')
in the if u dont need to put ;!
Reply
#5

Use strcmp instead of this
pawn Код:
if(text="1");
Reply
#6

Код:
  if(dialogid == 43) 
        { 

        if(response) 
        { 
        new text[128]; 
        strmid(text,inputtext,0,128); 

        if(strval(text) == 1)
        { 
            SendClientMessage(playerid, BLUE, "Test");
            return 1; 
        } 
        } 
        }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)