Weird cars bug
#1

Hello,
I have an RPG server using MySQL R34,
*Sometimes* when player buy a car from Dealership it didn't appear in /v ,
and there's another bug:
Example (most happened):
When a user buy Maverick he do /v , and he find an NRG! not maverick...
What's this weird bug ? i cannot even find an error!!
The rest users buy their car and it works good.
Reply
#2

Quote:
Originally Posted by YouHack
Посмотреть сообщение
Hello,
I have an RPG server using MySQL R34,
*Sometimes* when player buy a car from Dealership it didn't appear in /v ,
and there's another bug:
Example (most happened):
When a user buy Maverick he do /v , and he find an NRG! not maverick...
What's this weird bug ? i cannot even find an error!!
The rest users buy their car and it works good.
Did you checked if the vehicle ids overlaps? We don't even know your /v, you should post it to let us check if there's something wrong
Reply
#3

here is it:
PHP код:
CMD:v(playeridparams[])
{
    if(
gPlayerLogged[playerid] == 0) return SendClientMessage(playeridCOLOR_LIGHTRED"You need to login first.");
    new 
masina[456], masina1[456];
     if(
PlayerInfo[playerid][pPcarkey] != 0)
     {
         if(
personalcar[0][playerid] != 0)
         {
            
format(masina1sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pPcarkey]][cDescription]);
            
strcat(masinamasina1);
        }
        else
        {
            
format(masina1sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pPcarkey]][cDescription]);
            
strcat(masinamasina1);
        }
     }
     else
     {
         
format(masina1sizeof(masina1), "{F3FF73}[ empty ]\n");
        
strcat(masinamasina1);
    }
     if(
PlayerInfo[playerid][pmotokey] != 0)
     {
        if(
personalcar[1][playerid] != 0)
         {
            
format(masina1sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pmotokey]][cDescription]);
            
strcat(masinamasina1);
        }
        else
        {
            
format(masina1sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pmotokey]][cDescription]);
            
strcat(masinamasina1);
        }
     }
     else
     {
         
format(masina1sizeof(masina1), "{F3FF73}[ empty ]\n");
        
strcat(masinamasina1);
    }
     if(
PlayerInfo[playerid][pprcarkey] != 0)
     {
        if(
personalcar[2][playerid] != 0)
         {
            
format(masina1sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pprcarkey]][cDescription]);
            
strcat(masinamasina1);
        }
        else
        {
            
format(masina1sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pprcarkey]][cDescription]);
            
strcat(masinamasina1);
        }
     }
     else if(
PlayerInfo[playerid][pprcarkey] == && PlayerInfo[playerid][pPremiumAccount] > 0)
     {
         
format(masina1sizeof(masina1), "{F3FF73}[ empty ]\n");
        
strcat(masinamasina1);
    }
     if(
PlayerInfo[playerid][pprcarkey2] != 0)
     {
        if(
personalcar[3][playerid] != 0)
         {
            
format(masina1sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pprcarkey2]][cDescription]);
            
strcat(masinamasina1);
        }
        else
        {
            
format(masina1sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pprcarkey2]][cDescription]);
            
strcat(masinamasina1);
        }
     }
     else if(
PlayerInfo[playerid][pprcarkey2] == && PlayerInfo[playerid][pPremiumAccount] > 0)
     {
         
format(masina1sizeof(masina1), "{F3FF73}[ empty ]\n");
        
strcat(masinamasina1);
    }
     if(
PlayerInfo[playerid][pPPluscarkey] != 0)
     {
        if(
personalcar[4][playerid] != 0)
         {
            
format(masina1sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pPPluscarkey]][cDescription]);
            
strcat(masinamasina1);
        }
        else
        {
            
format(masina1sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pPPluscarkey]][cDescription]);
            
strcat(masinamasina1);
        }
     }
     else if(
PlayerInfo[playerid][pPPluscarkey] == && PlayerInfo[playerid][pPlusSlot1] > 0)
     {
         
format(masina1sizeof(masina1), "{F3FF73}[ empty ]\n");
        
strcat(masinamasina1);
    }
     if(
PlayerInfo[playerid][pPPluscarkey2] != 0)
     {
        if(
personalcar[5][playerid] != 0)
         {
            
format(masina1sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pPPluscarkey2]][cDescription]);
            
strcat(masinamasina1);
        }
        else
        {
            
format(masina1sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pPPluscarkey2]][cDescription]);
            
strcat(masinamasina1);
        }
     }
     else if(
PlayerInfo[playerid][pPPluscarkey2] == && PlayerInfo[playerid][pPlusSlot2] > 0)
     {
         
format(masina1sizeof(masina1), "{F3FF73}[ empty ]\n");
        
strcat(masinamasina1);
    }
     if(
PlayerInfo[playerid][pPcarkey] == && PlayerInfo[playerid][pmotokey] == && PlayerInfo[playerid][pprcarkey] == && PlayerInfo[playerid][pprcarkey2] == && PlayerInfo[playerid][pPPluscarkey] == && PlayerInfo[playerid][pPPluscarkey2] == 0)
         return 
SendClientMessage(playeridCOLOR_WHITE"You don't own any cars.");
    
ShowPlayerDialog(playerid,DIALOG_VEHSPAWN,DIALOG_STYLE_LIST,"Vehicle Spawn",masina,"Select","Exit");
    return 
1;

Reply
#4

Check if the problem depends by those vars, you need to know WHEN it gets bugged, i would suggest you to add a debug cmd that writes those variables in a format and do more tests maybe in a local server.
Well, it's not the best way but it's the method i use to find my bugs.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)