[Ajuda] argument type mismatch.
#1

Olб a todos, tenho uma pergunta, devo adicionar "[]" em estoque?

PHP код:
stock CriarPersonagem(playerid, nome[]) 
PHP код:
stock CriarPersonagem(playerid, nome) 
PHP код:
stock CriarPersonagem(playerid, nome)
{ 
    new
        
nome[60];
       
format(nome, sizeof(nome), "debug: %s", nome);
    
SendClientMessage(playerid, -1, nome);
}
        new 
nome[40];
            
strmid(nome, inputtext, 0, strlen(inputtext), 255);
            
CriarPersonagem(playerid, nome); //error 
Quote:

\gamemode RP\gamemodes\gamemode.pwn(5902) : error 035: argument type mismatch (argument 2)

Eu sou um iniciante e estou aprendendo com vocк.
Reply
#2

Quote:
Originally Posted by SukMathcuck
Посмотреть сообщение
Olб a todos, tenho uma pergunta, devo adicionar "[]" em estoque?

PHP код:
stock CriarPersonagem(playerid, nome[]) 
PHP код:
stock CriarPersonagem(playerid, nome) 
PHP код:
stock CriarPersonagem(playerid, nome)
{ 
    new
        
nome[60];
       
format(nome, sizeof(nome), "debug: %s", nome);
    
SendClientMessage(playerid, -1, nome);
}
        new 
nome[40];
            
strmid(nome, inputtext, 0, strlen(inputtext), 255);
            
CriarPersonagem(playerid, nome); //error 

Eu sou um iniciante e estou aprendendo com vocк.
Sim. Quando vocк adiciona [] ele se torna uma array/string assim podendo ser manipulados como string/textos.
Reply
#3

Resolvido, tуpico closed, reputado!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)