array sizes do not match, or destination array is too small
#1

Hi.

I need help with a code:

There are 2 errors:
PHP код:
Wilder Gaming Roleplay\gamemodes\WGRP.pwn(530) : error 047: array sizes do not match, or destination array is too small
Wilder Gaming Roleplay
\gamemodes\WGRP.pwn(542) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
2 Errors

Lines:

PHP код:
PlayerInfo[playerid][pSpol] = "musko"// "musko" means male 
PHP код:
PlayerInfo[playerid][pSpol] = "zensko"// "zensko" means female 
Whole code:
PHP код:
        case DIALOG_SPOL:
        {
            if(!
response) return Kick(playerid);
            else if(
response)
            {
                switch(
listitem)
                {
                    case 
0:
                    {
                        
PlayerInfo[playerid][pSpol] = "musko";
                        
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File,"Podatci");
                        
INI_WriteString(File,"pSpol","musko");
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{0080FF}WG:{FFFFFF} Odabrali ste spol. Nastavljate dalje sa registracijom...");
                        
ShowPlayerDialog(playerid,DIALOG_GODINE,DIALOG_STYLE_INPUT,"{FFFF00}Unesite godine","{FFFFFF}Molimo unesite vase {FFFF00}IC {FFFFFF}godine. Limit: 12-45","Unesi","Izlaz");
                        return 
1;
                    }
                    case 
1:
                    {
                        
PlayerInfo[playerid][pSpol] = "zensko";
                        
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File,"Podatci");
                        
INI_WriteString(File,"pSpol","zensko");
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{0080FF}WG:{FFFFFF} Odabrali ste spol. Nastavljate dalje sa registracijom...");
                          
ShowPlayerDialog(playerid,DIALOG_GODINE,DIALOG_STYLE_INPUT,"{FFFF00}Unesite godine","{FFFFFF}Molimo unesite vase {FFFF00}IC {FFFFFF}godine. Limit: 12-45","Unesi","Izlaz");
                        return 
1;
                    }
                }
            }
        } 
Reply
#2

pSpol is array?
Reply
#3

not for itself...

PHP код:
enum pInfo
{
    
pLozinka,
    
pEmail[40],
    
pNovac,
    
pSkin,
    
pAdministrator,
    
pAdminKod,
    
pSpol[20],
    
pGodine,
    
pUbojstava,
    
pSmrti
}
new 
PlayerInfo[MAX_PLAYERS][pInfo]; 
I use it for my enumerator.
Reply
#4

PHP код:
format (PlayerInfo[playerid][pSpol], 20"musko");
format (PlayerInfo[playerid][pSpol], 20"zensko"); 
PHP код:
PlayerInfo[playerid][pSpol][0] = EOS;
strcat (PlayerInfo[playerid][pSpol], "musko");//zensko 
Reply
#5

Quote:
Originally Posted by сан саныч
Посмотреть сообщение
PHP код:
format (PlayerInfo[playerid][pSpol], 20"musko");
format (PlayerInfo[playerid][pSpol], 20"zensko"); 
PHP код:
PlayerInfo[playerid][pSpol][0] = EOS;
strcat (PlayerInfo[playerid][pSpol], "musko");//zensko 
Thanks.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)