Jump to content
  • 0

Parametri car


Jimmi

Question

Problema intalnita (descriere):Am vrut sa fac o comanda /vhelp dar imi da eroar ela parametri.Am modificat totul cu informatile din loadpvehicles dar tot nu merge.
Ero(area / rile) / warning-(ul / urile):

C:\Users\Superman\Desktop\gamemodes\calu.pwn(27109) : warning 213: tag mismatch
C:\Users\Superman\Desktop\gamemodes\calu.pwn(27109) : warning 213: tag mismatch
C:\Users\Superman\Desktop\gamemodes\calu.pwn(27109) : warning 206: redundant test: constant expression is non-zero
C:\Users\Superman\Desktop\gamemodes\calu.pwn(27111) : error 017: undefined symbol "carkey"
C:\Users\Superman\Desktop\gamemodes\calu.pwn(27111) : error 001: expected token: ",", but found ";"
C:\Users\Superman\Desktop\gamemodes\calu.pwn(27114) : error 017: undefined symbol "vOwner2"
C:\Users\Superman\Desktop\gamemodes\calu.pwn(27116) : error 017: undefined symbol "carkey2"
C:\Users\Superman\Desktop\gamemodes\calu.pwn(27116) : error 001: expected token: ",", but found ";"
C:\Users\Superman\Desktop\gamemodes\calu.pwn(27119) : error 017: undefined symbol "vOwner3"
C:\Users\Superman\Desktop\gamemodes\calu.pwn(27121) : error 017: undefined symbol "carkey3"
C:\Users\Superman\Desktop\gamemodes\calu.pwn(27121) : error 001: expected token: ",", but found ";"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


8 Errors.

Liniile de cod / sursa / script-ul(obligatoriu):

//========================================[CMD /VHELP]========================================================//
CMD:vhelp(playerid, params[])
{
    new string[256], cDescription;
    if(IsPlayerConnected(playerid))
        SendClientMessage(playerid, COLOR_RED,"----------------------------------[Masini Personale]----------------------------------");
                if(vOwner != 999 && vOwner != 0)
                {
                    format(string, sizeof(string), " 1| Model: [%s]  Valoare: [%d]  Color1: [%d]  Color2: [%d]  Locked: [%d]  Numar: [%s]  ", vInfo[carkey][cDescription], vInfo[carkey][cValue], vInfo[carkey][cColorOne], vInfo[carkey][cColorTwo], vInfo[carkey][vLocked], vInfo[carkey][cNum],);
                    SendClientMessage(playerid, COLOR_GRAD5,string);
                }
                 if(vOwner2 != 999 && vOwner2 != 0)
                {
                    format(string, sizeof(string), " 2| Model: [%s]  Valoare: [%d]  Color1: [%d]  Color2: [%d]  Locked: [%d]  Numar: [%s]  ", vInfo[carkey2][cDescription], vInfo[carkey2][cValue], vInfo[carkey2][cColorOne], vInfo[carkey2][cColorTwo], vInfo[carkey2][vLocked], vInfo[carkey2][cNum],);
                    SendClientMessage(playerid, COLOR_GRAD5,string);
                }
                if(vOwner3 != 999 && vOwner3 != 0)
                {
                    format(string, sizeof(string), " 3| Model: [%s]  Valoare: [%d]  Color1: [%d]  Color2: [%d]  Locked: [%d]  Numar: [%s]  ", vInfo[carkey3][cDescription], vInfo[carkey3][cValue], vInfo[carkey3][cColorOne], vInfo[carkey3][cColorTwo], vInfo[carkey3][vLocked], vInfo[carkey3][cNum],);
                    SendClientMessage(playerid, COLOR_GRAD5,string);
       }
       return 1;
    }

si

stock LoadPVehicles()
{
    new result[24], index = 0; TuneTimer = 10;
    mysql_query("SELECT * FROM `vehicles` ORDER BY `vehicles`.`CarID` ASC");
    mysql_store_result();
    while(mysql_retrieve_row())
    {
        // LOADING DATA     \====================================================================/
        index++;
        mysql_get_field("CarID", result);         vInfo[index][vCariD] = strval(result);
        mysql_get_field("Model", result);         vInfo[index][vModel] = strval(result);
        mysql_get_field("Color1", result);         vInfo[index][vColor1] = strval(result);
        mysql_get_field("Color2", result);         vInfo[index][vColor2] = strval(result);
        mysql_get_field("Price", result);         vInfo[index][vPrice] = strval(result);
        mysql_get_field("Owner", result);         strmid(vInfo[index][vOwner], result, false, strlen(result), 24);
        mysql_get_field("vPosX", result);         vInfo[index][vPosX] = floatstr(result);
        mysql_get_field("vPosY", result);         vInfo[index][vPosY] = floatstr(result);
        mysql_get_field("vPosZ", result);         vInfo[index][vPosZ] = floatstr(result);
        mysql_get_field("vPosA", result);         vInfo[index][vPosA] = floatstr(result);
        mysql_get_field("Plate", result);         strmid(vInfo[index][vPlate], result, false, strlen(result), 24);
        mysql_get_field("PaintJ", result);         vInfo[index][vPaintJ] = strval(result);
        mysql_get_field("Locked", result);         vInfo[index][vLocked] = strval(result);
        mysql_get_field("Towed", result);         vInfo[index][vTowed] = strval(result);
        mysql_get_field("PlateModel", result);      vInfo[index][vPlateMod] = strval(result);
        mysql_get_field("Registred", result);      vInfo[index][vReg] = strval(result);
        mysql_get_field("Vechime", result);         vInfo[index][vVechime] = strval(result);

      mysql_get_field("vMod1", result);         vMods[index][0] = strval(result);
        mysql_get_field("vMod2", result);         vMods[index][1] = strval(result);
        mysql_get_field("vMod3", result);         vMods[index][2] = strval(result);
        mysql_get_field("vMod4", result);         vMods[index][3] = strval(result);
        mysql_get_field("vMod5", result);         vMods[index][4] = strval(result);
        mysql_get_field("vMod6", result);         vMods[index][5] = strval(result);
        mysql_get_field("vMod7", result);         vMods[index][6] = strval(result);
        mysql_get_field("vMod8", result);         vMods[index][7] = strval(result);
        mysql_get_field("vMod9", result);         vMods[index][8] = strval(result);
        mysql_get_field("vMod10", result);         vMods[index][9] = strval(result);
        mysql_get_field("vMod11", result);         vMods[index][10] = strval(result);
        mysql_get_field("vMod12", result);         vMods[index][11] = strval(result);
        mysql_get_field("vMod13", result);         vMods[index][12] = strval(result);
        mysql_get_field("vMod14", result);         vMods[index][13] = strval(result);

      // CREATING VEHICLE  \====================================================================/

      new i = index;

        if(vInfo[i][vPosX] == 0.0 && vInfo[i][vPosY] == 0.0 && vInfo[i][vPosZ] == 0.0) { ++ Total_Veh_Created; /*INI_Close();*/ continue; }

      new
         vCarID = CreateVehicle(vInfo[i][vModel], vInfo[i][vPosX], vInfo[i][vPosY], vInfo[i][vPosZ], vInfo[i][vPosA], vInfo[i][vColor1], vInfo[i][vColor2], 500000);
      SetVehicleNumberPlate(vCarID, vInfo[i][vPlate]);
      ChangeVehiclePaintjob(vCarID, vInfo[i][vPaintJ]);

      for(new iMod = 0; iMod < MAX_VEH_MODS; ++iMod)
      {
          if(vMods[index][iMod] > 0)
          {
              AddVehicleComponent(vCarID, vMods[index][0]);
              AddVehicleComponent(vCarID, vMods[index][1]);
              AddVehicleComponent(vCarID, vMods[index][2]);
              AddVehicleComponent(vCarID, vMods[index][3]);
              AddVehicleComponent(vCarID, vMods[index][4]);
              AddVehicleComponent(vCarID, vMods[index][5]);
              AddVehicleComponent(vCarID, vMods[index][6]);
              AddVehicleComponent(vCarID, vMods[index][7]);
              AddVehicleComponent(vCarID, vMods[index][8]);
              AddVehicleComponent(vCarID, vMods[index][9]);
              AddVehicleComponent(vCarID, vMods[index][10]);
              AddVehicleComponent(vCarID, vMods[index][11]);
              AddVehicleComponent(vCarID, vMods[index][12]);
              AddVehicleComponent(vCarID, vMods[index][13]);
         }
      }

      Total_Veh_Created = vInfo[index][vCariD];

      //    MYSQL PART     \====================================================================/

      //new query[512];
      //format(query, sizeof(query),"UPDATE `vehicles` SET `CarID` = '%d' WHERE `CarID` = '%d';", index, vInfo[index][vCariD]);
      //mysql_query(string);
    }
    mysql_free_result();
   printf("%d cars created!", Total_Veh_Created);
    return 1;
}


Imagini / Video (optional):-
Ati incercat sa rezolvati singur?:da

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Da am rezolvat eu alea dar astea chiar nu stiu cum:

C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(27069) : warning 213: tag mismatch
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(27069) : warning 213: tag mismatch
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(27069) : warning 206: redundant test: constant expression is non-zero
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(27071) : warning 213: tag mismatch
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(27076) : warning 213: tag mismatch
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(27081) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase

Linia 27069

 if(vOwner != 999 && vOwner != 0)

Linia 27071

                    format(string, sizeof(string), " 1| Model: [%s]  Valoare: [%d]  Color1: [%d]  Color2: [%d]  Locked: [%d]  Numar: [%s]  ", vInfo[carkey][cDescription], vInfo[carkey][vPrice], vInfo[carkey][vColor1], vInfo[carkey][vColor2], vInfo[carkey][vLocked], vInfo[carkey][vPlate]);

si 27076

format(string, sizeof(string), " 2| Model: [%s]  Valoare: [%d]  Color1: [%d]  Color2: [%d]  Locked: [%d]  Numar: [%s]  ", vInfo[carkey2][cDescription], vInfo[carkey2][vPrice], vInfo[carkey2][vColor1], vInfo[carkey2][vColor2], vInfo[carkey2][vLocked], vInfo[carkey2][vPlate]);
                   

iar 27078

format(string, sizeof(string), " 3| Model: [%s]  Valoare: [%d]  Color1: [%d]  Color2: [%d]  Locked: [%d]  Numar: [%s]  ", vInfo[carkey3][cDescription], vInfo[carkey3][vPrice], vInfo[carkey3][vColor1], vInfo[carkey3][vColor2], vInfo[carkey3][vLocked], vInfo[carkey3][vPlate]);
                   

 

Comanda aratand asa:

//========================================[CMD /VHELP]========================================================//
CMD:vhelp(playerid, params[])
{
    new string[256], cDescription;
    new carkey, carkey2, carkey3;
    new vOwner2, vOwner3;
    if(IsPlayerConnected(playerid))
        SendClientMessage(playerid, COLOR_RED,"----------------------------------[Masini Personale]----------------------------------");
                if(vOwner != 999 && vOwner != 0)
                {
                    format(string, sizeof(string), " 1| Model: [%s]  Valoare: [%d]  Color1: [%d]  Color2: [%d]  Locked: [%d]  Numar: [%s]  ", vInfo[carkey][cDescription], vInfo[carkey][vPrice], vInfo[carkey][vColor1], vInfo[carkey][vColor2], vInfo[carkey][vLocked], vInfo[carkey][vPlate]);
                    SendClientMessage(playerid, COLOR_GRAD5,string);
                }
                 if(vOwner2 != 999 && vOwner2 != 0)
                {
                    format(string, sizeof(string), " 2| Model: [%s]  Valoare: [%d]  Color1: [%d]  Color2: [%d]  Locked: [%d]  Numar: [%s]  ", vInfo[carkey2][cDescription], vInfo[carkey2][vPrice], vInfo[carkey2][vColor1], vInfo[carkey2][vColor2], vInfo[carkey2][vLocked], vInfo[carkey2][vPlate]);
                    SendClientMessage(playerid, COLOR_GRAD5,string);
                }
                if(vOwner3 != 999 && vOwner3 != 0)
                {
                    format(string, sizeof(string), " 3| Model: [%s]  Valoare: [%d]  Color1: [%d]  Color2: [%d]  Locked: [%d]  Numar: [%s]  ", vInfo[carkey3][cDescription], vInfo[carkey3][vPrice], vInfo[carkey3][vColor1], vInfo[carkey3][vColor2], vInfo[carkey3][vLocked], vInfo[carkey3][vPlate]);
                    SendClientMessage(playerid, COLOR_GRAD5,string);
       }
       return 1;
    }
Link to comment
Share on other sites

  • 0
 if(vOwner[playerid] != 999 && vOwner[playerid] != 0)

Asa ar trebuii sa fie, in orice caz arata-mi unde este definita aceasta variabila.

(P.S. E cumva vOwner[MAX_PLAYERS]?)

242086.png

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.