MDC is crashing
#1

I've created this this command to check the players MDC, but after using it the server is crashing, Thanks for your advise

PHP код:
ShowMDC(playeridName[])
{
    new 
Data[150],Field[258],idxiUsername[255], iAgeiSuspect[255];
    
mysql_queryF("SELECT * FROM `Accounts` WHERE `Username` = '%s' LIMIT 1"Name);
    
mysql_store_result();
    if(
mysql_num_rows() == 1){
        
mysql_fetch_rowEx(Data);
        
Field strtukDataidx'|' );
          for(new 
020s++)
        {
            switch(
s)
            {
                case 
1strmid(iUsername,Field,0,strlen(Field),255);
                case 
11iAge strval(Field);
                case 
20strmid(iSuspect,Field,0,strlen(Field),255);
            }
            
Field strtukDataidx'|' );
        }
        
mysql_free_result();
        new 
string[128], string1[258];
            
        
format(string1sizeof(string1),"Police Mobile Database Computer: Name: %s | Age %d | Gender (coming)",iUsernameiAge );
        
SendClientMessage(playeridORANGEstring1);
            
        
format(stringsizeof(string), "Arrests(coming) | Wanted(coming)| Suspect:%s | Phone number:(coming)",iSuspect);
        
SendClientMessage(playeridWHITEstring);
        }
        else
        {
            
SendClientMessage(playeridRED"This account doesn't exist");
    }
    return 
1;

PHP код:
command(mdcplayeridparams[])
{
    new 
Name[119];
    if(
sscanf(params"s"Name))
    {
        if(
Factions[Player[playerid][Faction]][CommandTypes] == || Factions[Player[playerid][Faction]][CommandTypes] == 3)
        {
            
SendClientMessage(playeridWHITE"SYNTAX: /mdc [Username]");
        }
        else
        {
            
RemoveTextMessage(playerid);
            
TextDrawShowForPlayer(playeridText:CantCommand);
            
SetTimerEx("RemoveTextMessage"3500false"d"playerid);
        }
    }
    else
    {
        if(
Factions[Player[playerid][Faction]][CommandTypes] == || Factions[Player[playerid][Faction]][CommandTypes] == 3)
        {
            
format(Name,sizeof(Name),"%s"Name);
            
ShowMDC(playeridName);
        }
        else
        {
            
RemoveTextMessage(playerid);
            
TextDrawShowForPlayer(playeridText:CantCommand);
            
SetTimerEx("RemoveTextMessage"3500false"d"playerid);
        }
    }
    return 
1;

Reply
#2

Server log?
Reply
#3

Quote:
Originally Posted by alexanderjb918
Посмотреть сообщение
Server log?
Doesn't give any warning/fails
Reply
#4

Quote:
Originally Posted by lulo356
Посмотреть сообщение
Doesn't give any warning/fails
PHP код:
mysql_fetch_rowEx(Data); 
this is the problm
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)