DOF2_GetString BUG
#1

PHP код:
    if(!strcmp(cmd,"/searchmap",true))
    {
        new 
tmp2[288];
        
tmp2 strrest(cmdtextidx);
        if(!
strlen(tmp2))return SendClientMessage(playerid,-1,color_lblue"/SearchMap [MapperName]");
        
        new 
dir:dHandle dir_open("./scriptfiles/Tracks");
        new 
item[40], type;
        new 
idxx;
        new 
Spl[2][25];
        while(
dir_list(dHandleitemtype))
        {
            if(
type == FM_FILE)
            {
                
Spl[0][0] = EOS;
                
split(item,Spl,'.');
                new 
File[85];
                
format(File,sizeof(File),"Tracks/%s.track",Spl[0]);
                
SendClientMessage(playerid,-1,DOF2_GetString(File,"Author"));
                if(!
strcmp(tmp2,DOF2_GetString(File,"Author"),true))
                {
                    
SendFormat(playerid,-1,"%d. "color_yellow"\"%s\" By: "color_white"%s",idxx,Spl[0],DOF2_GetString(File,"Author"));
                    
idxx++;
                }
            }
        }
        
dir_close(dHandle);
        return 
1;
    } 
Why this code dont work?
I tried to print the Author name from the file but I got ""
Reply
#2

UP!!
Reply
#3

helppp
Reply
#4

Try to get the string into a value before using it in SendClientMessage.
Reply
#5

Quote:
Originally Posted by Awide
Посмотреть сообщение
Try to get the string into a value before using it in SendClientMessage.
Like that?

Код:
new Author[24];
Autor = DOF2_GetString(File,"Author");
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)