Pawn Compiler has stopped working.
#1

Hi, good afternoon, can someone help me, please? Today I'm trying to make a character creation system, everything was going right, until my Pawn Compiler Library stopped working and showed these following errors:

Remember that the part of the code is to verify if the name of the character is empty or not. If you're sitting empty and looking at yourself.

Код:
gamemode RP\gamemodes\gamemode.pwn(6702) : warning 213: tag mismatch
gamemode RP\gamemodes\gamemode.pwn(6702) : warning 213: tag mismatch
Which would be in this line:

PHP код:
format(strsizeof(str), "%s", (!PlayerInfo[playerid][pPersonagem1]) ? ("Vazio") : (PlayerInfo[playerid][pPersonagem1]));
PlayerTextDrawSetString(playeridPlayerInfo[playerid][pTextDraws][2], str); 
public:
PHP код:
stock MenuPersonagens(playerid)
{
    new 
str[100];
    
/*if (CriandoPersonagem[playerid] == 0)
    {
        //Logando com o personagem
        
        for (new i = 0; i < 8; i++)
        {
            PlayerTextDrawHide(playerid, PlayerInfo[playerid][pTextDraws][i]);
        }
        for (new i = 71; i < 81; i++)
        {
            PlayerTextDrawHide(playerid, PlayerInfo[playerid][pTextDraws][i]);
        }
    }*/
    
format(strsizeof(str), "%s", (!PlayerInfo[playerid][pPersonagem1]) ? ("Vazio") : (PlayerInfo[playerid][pPersonagem1]));
    
PlayerTextDrawSetString(playeridPlayerInfo[playerid][pTextDraws][2], str);
    
format(strsizeof(str), "%s", (!PlayerInfo[playerid][pPersonagem2]) ? ("Vazio") : (PlayerInfo[playerid][pPersonagem2]));
    
PlayerTextDrawSetString(playeridPlayerInfo[playerid][pTextDraws][3], str);
    
format(strsizeof(str), "%s", (!PlayerInfo[playerid][pPersonagem3]) ? ("Vazio") : (PlayerInfo[playerid][pPersonagem3]));
    
PlayerTextDrawSetString(playeridPlayerInfo[playerid][pTextDraws][4], str);
    for (new 
25i++)
    {
        
PlayerTextDrawHide(playeridPlayerInfo[playerid][pTextDraws][i]);
        
PlayerTextDrawShow(playeridPlayerInfo[playerid][pTextDraws][i]);
    }
    
SelectTextDraw(playerid, -1);

Reply
#2

pPersonagem1 is a string?
Reply
#3

Hello Gusteakas, I'm trying to define with letters, it's the name of the character, I'm having this work because I do not know the functions that I can work with.

PHP код:
enum pInfo2
{
    
pSenha,
    
pPersonagem1,
    
pPersonagem2,
    
pPersonagem3
};
new 
Account[MAX_PLAYERS][pInfo2];
            
DOF2_CreateFile(arquivo);
            
DOF2_SetString(arquivo"Senha"Account[playerid][pSenha]);
            
DOF2_SetString(arquivo"Personagem1""Vazio");
            
DOF2_SetString(arquivo"Personagem2""Vazio");
            
DOF2_SetString(arquivo"Personagem3""Vazio");
            
DOF2_SaveFile(); 
@edit

PHP код:
    new
        
arquivo[100],
        
name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    
format(arquivo40"Contas de Usuбrios/%s.ini"name);
    if (
strcmp(PlayerInfo[playerid][pPersonagem1], "Vazio"true) == 0format(strsizeof(str), "Vazio");
    else 
format(strsizeof(str), "%s"PlayerInfo[playerid][pPersonagem1]);
    
PlayerTextDrawSetString(playeridPlayerInfo[playerid][pTextDraws][2], str); 
Reply
#4

pPersonagem1 has to be string.
Reply
#5

Quote:
Originally Posted by iLearner
Посмотреть сообщение
pPersonagem1 has to be string.
How do I save only letters? I did not find the function to save, I ended up doing stupid things.

PHP код:
PlayerInfo[playerid][pPersonagem1] = "Vazio";
PlayerInfo[playerid][pPersonagem2] = "Vazio";
PlayerInfo[playerid][pPersonagem3] = "Vazio"
Reply
#6

PHP код:
enum pInfo2 

    
pSenha
    
pPersonagem1[40], 
    
pPersonagem2[40], 
    
pPersonagem3[40
}; 
Reply
#7

Quote:
Originally Posted by iLearner
Посмотреть сообщение
PHP код:
enum pInfo2 

    
pSenha
    
pPersonagem1[40], 
    
pPersonagem2[40], 
    
pPersonagem3[40
}; 
Thanks, I understand, it increases the cells, reputed, but I'm noticing error, I'm getting a headache from not being able to fix this problem.

PHP код:
    if (strcmp(PlayerInfo[playerid][pPersonagem1] == "Vazio"format(strsizeof(str), "Vazio"); //error 
    
else format(strsizeof(str), "%s"PlayerInfo[playerid][pPersonagem1]);
    
PlayerTextDrawSetString(playeridPlayerInfo[playerid][pTextDraws][2], str);
    if (
strcmp(PlayerInfo[playerid][pPersonagem2] == "Vazio"format(strsizeof(str), "Vazio"); 
    else 
format(strsizeof(str), "%s"PlayerInfo[playerid][pPersonagem2]);
    
PlayerTextDrawSetString(playeridPlayerInfo[playerid][pTextDraws][3], str);
    if (
strcmp(PlayerInfo[playerid][pPersonagem3] == "Vazio"format(strsizeof(str), "Vazio");
    else 
format(strsizeof(str), "%s"PlayerInfo[playerid][pPersonagem3]);
    
PlayerTextDrawSetString(playeridPlayerInfo[playerid][pTextDraws][4], str); 
Reply
#8

What error exactly.
Reply
#9

Quote:
Originally Posted by iLearner
Посмотреть сообщение
What error exactly.
Код:
C:\Users\User\Desktop\San Andreas Multiplayer\gamemode RP\gamemodes\gamemode.pwn(6701) : warning 213: tag mismatch
C:\Users\User\Desktop\San Andreas Multiplayer\gamemode RP\gamemodes\gamemode.pwn(6701) : error 033: array must be indexed (variable "-unknown-")
C:\Users\User\Desktop\San Andreas Multiplayer\gamemode RP\gamemodes\gamemode.pwn(6702) : warning 213: tag mismatch
C:\Users\User\Desktop\San Andreas Multiplayer\gamemode RP\gamemodes\gamemode.pwn(6705) : warning 213: tag mismatch
C:\Users\User\Desktop\San Andreas Multiplayer\gamemode RP\gamemodes\gamemode.pwn(6705) : error 033: array must be indexed (variable "-unknown-")
C:\Users\User\Desktop\San Andreas Multiplayer\gamemode RP\gamemodes\gamemode.pwn(6706) : warning 213: tag mismatch
C:\Users\User\Desktop\San Andreas Multiplayer\gamemode RP\gamemodes\gamemode.pwn(6709) : warning 213: tag mismatch
C:\Users\User\Desktop\San Andreas Multiplayer\gamemode RP\gamemodes\gamemode.pwn(6709) : error 033: array must be indexed (variable "-unknown-")
C:\Users\User\Desktop\San Andreas Multiplayer\gamemode RP\gamemodes\gamemode.pwn(6710) : warning 213: tag mismatch
Reply
#10

PHP код:
if (!strcmp(PlayerInfo[playerid][pPersonagem1], "Vazio"str "Vazio"//error  
    
else
    
format(strsizeof(str), "%s"PlayerInfo[playerid][pPersonagem1]); 
    
PlayerTextDrawSetString(playeridPlayerInfo[playerid][pTextDraws][2], str); 
Did you declare str as string?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)