Variable with letters and numbers
#1

Hello, I have a problem, I use letters and numbers, most can not, and has error, the variable is used to save the e-mail a player ..

PHP код:
enum pInfo
{
    
pFuncao[56]
}
format(var,32,"Email=%s\n",PlayerInfo[playerid][pEmail]);fwrite(hFile, var); 
onplayerconect:

PHP код:
strmid(PlayerInfo[playerid][pEmail], "empty"0strlen("empty"), 255); 
Variable to be defined:
PHP код:
if (dialogid == DIALOG_EMAIL_1)
    {
        if (
response)
        {
                
PlayerInfo[playerid][pEmail] = inputtext//error
        
}
   } 
Код:
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(22440) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

pawn Код:
#if !defined strcpy
    #define strcpy(%0,%1) strcat((%0[0] = EOS, %0), %1)
#endif
usage:
Код:
strcpy(PlayerInfo[playerid][pEmail], inputtext, /* SIZE OF "pEmail" HERE */);
and modify the size on the red text.
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
pawn Код:
#if !defined strcpy
    #define strcpy(%0,%1) strcat((%0[0] = EOS, %0), %1)
#endif
usage:
Код:
strcpy(PlayerInfo[playerid][pEmail], inputtext, /* SIZE OF "pEmail" HERE */);
and modify the size on the red text.
Or use strunpack, it's faster and do the same thing :3
Reply
#4

Quote:
Originally Posted by Dutheil
Посмотреть сообщение
Or use strunpack, it's faster and do the same thing :3
Proof? Benchmarks?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)