Help me sql save tuning
#1

hello, i'am newbie scripter ( sorry for my bad english) i create a system save tunning in a care but i got 24 error HELP
edit :
now i got this errors

PHP код:
function1:
    
TuneVehicleRandomly(VehicleID)
    {
            new 
Tuningpart[36],Tick=0,Model=GetVehicleModel(VehicleID);
            for(new 
i=999;i<1194;i++){if(i>=1000&&i<=1993&&GetVehicleUpgrade(Model,i)){Tuningpart[Tick]=i;Tick++;}}
            
AddVehicleComponent(VehicleID,randomEx(Tuningpart[0],Tuningpart[1],Tuningpart[2],Tuningpart[3],Tuningpart[4],Tuningpart[5]));
            
AddVehicleComponent(VehicleID,randomEx(Tuningpart[6],Tuningpart[7],Tuningpart[8],Tuningpart[9],Tuningpart[0]));
            
AddVehicleComponent(VehicleID,randomEx(Tuningpart[11],Tuningpart[12],Tuningpart[13],Tuningpart[14],Tuningpart[15]));
            
AddVehicleComponent(VehicleID,randomEx(Tuningpart[16],Tuningpart[17],Tuningpart[18],Tuningpart[19],Tuningpart[20]));
            
AddVehicleComponent(VehicleID,randomEx(Tuningpart[20],Tuningpart[21],Tuningpart[22],Tuningpart[23],Tuningpart[24]));
            
AddVehicleComponent(VehicleID,randomEx(Tuningpart[26],Tuningpart[27],Tuningpart[28],Tuningpart[29],Tuningpart[30]));
            
AddVehicleComponent(VehicleID,randomEx(Tuningpart[30],Tuningpart[31],Tuningpart[32],Tuningpart[33],Tuningpart[34],Tuningpart[35]));
            
ChangeVehicleColor(VehicleID,randomEx(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,28,32,41,42,43,44,45,46,47,48,49,50,123,124,125,126,130,131,132,142,144,146,147,148,149,150,141,128,129,130,131,132,142,144,145,1146,147,148,149,150,151,160,165,166,181,182,183,184,185,186,255,252),
            
randomEx(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,28,32,41,42,43,44,45,46,47,48,49,50,123,124,125,126,130,131,132,142,144,146,147,148,149,150,141,128,129,130,131,132,142,144,145,1146,147,148,149,150,151,160,165,166,181,182,183,184,185,186,255,252));
    } 
PHP код:
else if(strcmp(subcmd"autotune"true) == 0)
             {
                  new 
Tuningpart [36];
                  new 
Model GetPlayerVehicleID(playerid);
                  if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1"small women");
                  if(!
IsPlayerInRangeOfPoint(playerid7.01664.5500, -1894.903012.3459)) return SendClientMessage(playeridCOLOR_USAGE"{FF6600}strong women");
                  
TuneVehicleRandomly(GetPlayerVehicleID(playerid));
                  
CarInfo[Model][tPaintJob] = Tuningpart;
                  
CarInfo[Model][tExhausts] = Tuningpart;
                  
CarInfo[Model][tFrontBumper] = Tuningpart;
                  
CarInfo[Model][tRearBumper] = Tuningpart;
                  
CarInfo[Model][tRoof] = Tuningpart;
                  
CarInfo[Model][tSpoilers] = Tuningpart;
                  
CarInfo[Model][tSideBumper] = Tuningpart;
                  
CarInfo[Model][tWheels] = Tuningpart;
                  
CarInfo[Model][tHydraulics] = Tuningpart;
                  
CarInfo[Model][tNeon] = Tuningpart;
                  
CarInfo[Model][tNitro] = Tuningpart;
                  
CarInfo[Model][tSideBumper2] = Tuningpart;
                  
SaveSQLCar(Model,false);
                  return 
SendClientMessage(playerid,-1,"be strong");
                  
             } 
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17111 ) : error 006: must be assigned to an array
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17112 ) : error 006: must be assigned to an array
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17113 ) : error 006: must be assigned to an array
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17114 ) : error 006: must be assigned to an array
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17115 ) : error 006: must be assigned to an array
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17116 ) : error 006: must be assigned to an array
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17117 ) : error 006: must be assigned to an array
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17118 ) : error 006: must be assigned to an array
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17119 ) : error 006: must be assigned to an array
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17120 ) : error 006: must be assigned to an array
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17121 ) : error 006: must be assigned to an array
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17122 ) : error 006: must be assigned to an array
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


12 Errors.
help plz
Reply
#2

HI . try the fllowing script:


PHP код:
else if(strcmp(subcmd"autotune"true) == 0)
             {
                  new 
Model=GetPlayerVehicleID(playerid);
                  if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1" text");
                  if(!
IsPlayerInRangeOfPoint(playerid7.01664.5500, -1894.903012.3459)) return SendClientMessage(playeridCOLOR_USAGE"{FF6600}tet");
                  
TuneVehicleRandomly(GetPlayerVehicleID(playerid));
                  
CarInfo[Model][tPaintJob] = randomEx;
                  
CarInfo[Model][tExhausts] = randomEx;
                  
CarInfo[Model][tFrontBumper] = randomEx;
                  
CarInfo[Model][tRearBumper] = randomEx;
                  
CarInfo[Model][tRoof] = randomEx;
                  
CarInfo[Model][tSpoilers] = randomEx;
                  
CarInfo[Model][tSideBumper] = randomEx;
                  
CarInfo[Model][tWheels] = randomEx;
                  
CarInfo[Model][tHydraulics] = randomEx;
                  
CarInfo[Model][tNitro] = randomEx;
                  
CarInfo[Model][tSideBumper2] = randomEx;
                  
aveSQLCar(Model,false);
                  return 
SendClientMessage(playerid,-1,"text");
                  
             } 
PHP код:
function1:
    
TuneVehicleRandomly(VehicleID)
    {
            new 
Tuningpart[36],Tick=0,Model=GetVehicleModel(VehicleID);
            for(new 
i=999;i<1194;i++){if(i>=1000&&i<=1993&&GetVehicleUpgrade(Model,i)){Tuningpart[Tick]=i;Tick++;}}
            
AddVehicleComponent(VehicleID,randomEx(Tuningpart[0],Tuningpart[1],Tuningpart[2],Tuningpart[3],Tuningpart[4],Tuningpart[5]));
            
AddVehicleComponent(VehicleID,randomEx(Tuningpart[6],Tuningpart[7],Tuningpart[8],Tuningpart[9],Tuningpart[0]));
            
AddVehicleComponent(VehicleID,randomEx(Tuningpart[11],Tuningpart[12],Tuningpart[13],Tuningpart[14],Tuningpart[15]));
            
AddVehicleComponent(VehicleID,randomEx(Tuningpart[16],Tuningpart[17],Tuningpart[18],Tuningpart[19],Tuningpart[20]));
            
AddVehicleComponent(VehicleID,randomEx(Tuningpart[20],Tuningpart[21],Tuningpart[22],Tuningpart[23],Tuningpart[24]));
            
AddVehicleComponent(VehicleID,randomEx(Tuningpart[26],Tuningpart[27],Tuningpart[28],Tuningpart[29],Tuningpart[30]));
            
AddVehicleComponent(VehicleID,randomEx(Tuningpart[30],Tuningpart[31],Tuningpart[32],Tuningpart[33],Tuningpart[34],Tuningpart[35]));
            
ChangeVehicleColor(VehicleID,randomEx(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,28,32,41,42,43,44,45,46,47,48,49,50,123,124,125,126,130,131,132,142,144,146,147,148,149,150,141,128,129,130,131,132,142,144,145,1146,147,148,149,150,151,160,165,166,181,182,183,184,185,186,255,252),
            
randomEx(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,28,32,41,42,43,44,45,46,47,48,49,50,123,124,125,126,130,131,132,142,144,146,147,148,149,150,141,128,129,130,131,132,142,144,145,1146,147,148,149,150,151,160,165,166,181,182,183,184,185,186,255,252));
    } 
Reply
#3

D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17110 ) : error 076: syntax error in the expression, or invalid function call
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17111 ) : error 076: syntax error in the expression, or invalid function call
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17112 ) : error 076: syntax error in the expression, or invalid function call
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17113 ) : error 076: syntax error in the expression, or invalid function call
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17114 ) : error 076: syntax error in the expression, or invalid function call
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17115 ) : error 076: syntax error in the expression, or invalid function call
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17116 ) : error 076: syntax error in the expression, or invalid function call
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17117 ) : error 076: syntax error in the expression, or invalid function call
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17118 ) : error 076: syntax error in the expression, or invalid function call
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17119 ) : error 076: syntax error in the expression, or invalid function call
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17120 ) : error 076: syntax error in the expression, or invalid function call
D:\p\GtaSa (1)\samp03e_svr_R2_win321\gamemodes\sarp.pwn(17121 ) : error 017: undefined symbol "aveSQLCar"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


12 Errors.
Reply
#4

up plz
Reply
#5

PHP код:
else if(strcmp(subcmd"autotune"true) == 0)
             {
                  
                  if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1"");
                  if(!
IsPlayerInRangeOfPoint(playerid7.01664.5500, -1894.903012.3459)) return SendClientMessage(playeridCOLOR_USAGE"");
                  
TuneVehicleRandomly(GetPlayerVehicleID(playerid));
                  new 
Model GetPlayerVehicleID(playerid);
                  
CarInfo[Model][tPaintJob] = TuneVehicleRandomly(GetPlayerVehicleID(playerid));
                  
CarInfo[Model][tExhausts] = TuneVehicleRandomly(GetPlayerVehicleID(playerid));
                  
CarInfo[Model][tFrontBumper] = TuneVehicleRandomly(GetPlayerVehicleID(playerid));
                  
CarInfo[Model][tRearBumper] = TuneVehicleRandomly(GetPlayerVehicleID(playerid));
                  
CarInfo[Model][tRoof] = TuneVehicleRandomly(GetPlayerVehicleID(playerid));
                  
CarInfo[Model][tSpoilers] = TuneVehicleRandomly(GetPlayerVehicleID(playerid));
                  
CarInfo[Model][tSideBumper] = TuneVehicleRandomly(GetPlayerVehicleID(playerid));
                  
CarInfo[Model][tWheels] = TuneVehicleRandomly(GetPlayerVehicleID(playerid));
                  
CarInfo[Model][tHydraulics] = TuneVehicleRandomly(GetPlayerVehicleID(playerid));
                  
CarInfo[Model][tNitro] = TuneVehicleRandomly(GetPlayerVehicleID(playerid));
                  
CarInfo[Model][tSideBumper2] = TuneVehicleRandomly(GetPlayerVehicleID(playerid));
                  
SaveSQLCar(Model,false);
                  return 
SendClientMessage(playerid,-1,"");                  
             } 
enjoy
Reply
#6

thaks a lot (reped)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)