How do I fix this error?
#1

Code:
grandlarc.pwn(603) : error 035: argument type mismatch (argument 2)
PHP Code:
    if(dialogid==2)
    {
        if(
response)
        {
            new 
message[256];
            
format(message256"Your skin has been changed to %i."inputtext);
            
SendClientMessage(playerid, -1message);
            
SetPlayerSkin(playeridinputtext);    //line 603
                
return 1;
        }
        
    } 
Reply
#2

you can not pass string array to the integer value

use this instead of inputtext

Code:
strvar(inputtext)
it will convert your string to the integer value
Reply
#3

Quote:
Originally Posted by iorp
View Post
you can not pass string array to the integer value

use this instead of inputtext

Code:
strvar(inputtext)
it will convert your string to the integer value
you mean strval
https://sampwiki.blast.hk/wiki/Strval
Code:
    if(dialogid==2) 
    { 
        if(response) 
        { 
            new message[256]; 
            format(message, 256, "Your skin has been changed to %i.", inputtext); 
            SendClientMessage(playerid, -1, message); 
            SetPlayerSkin(playerid, strval(inputtext));    //line 603 
                return 1; 
        } 
         
    }
Reply
#4

Quote:
Originally Posted by zerruv
View Post
you mean strval
https://sampwiki.blast.hk/wiki/Strval
Code:
    if(dialogid==2) 
    { 
        if(response) 
        { 
            new message[256]; 
            format(message, 256, "Your skin has been changed to %i.", inputtext); 
            SendClientMessage(playerid, -1, message); 
            SetPlayerSkin(playerid, strval(inputtext));    //line 603 
                return 1; 
        } 
         
    }
yes, I meant to use strval for convert a string to integer
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)