Raised This Month: $99 Target: $400
 24% 

error 035: argument type mismatch (argument 1)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lisauro
New Member
Join Date: Oct 2020
Old 10-12-2020 , 23:14   error 035: argument type mismatch (argument 1)
Reply With Quote #1

Trying to fix a code, getting error in this line. Am noob, sorry, provided all warning/error info as compiler show.
Code:
CreateTeamVehicle(org,rank,model,Float:X,Float:Y,Float:Z,Float:A,Color_1,Color_2,spawntime)
{
	new carid = J_AddStaticVehicleEx(model, X, Y, Z, A, Color_1, Color_2, spawntime);  <=== error in this line
	VehicleInfo[carid][vTeam] = org;
	VehicleInfo[carid][vRank] = rank;
	return carid;
}
In fact multiple warnings just for that line.
symbol is never used: "spawntime"
symbol is never used: "Color_2"
symbol is never used: "Color_1"
symbol is never used: "A"
symbol is never used: "Z"
symbol is never used: "Y"
symbol is never used: "X"
symbol is never used: "model"
warning 219: local variable "model" shadows a variable at a preceding level
warning 219: local variable "X" shadows a variable at a preceding level
warning 219: local variable "Y" shadows a variable at a preceding level
warning 219: local variable "Z" shadows a variable at a preceding level
warning 219: local variable "A" shadows a variable at a preceding level
warning 219: local variable "carid" shadows a variable at a preceding level
lisauro is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 10-12-2020 , 23:39   Re: error 035: argument type mismatch (argument 1)
Reply With Quote #2

well using old syntax, also this snippet code you pasted here is not enough to somebody help you
Post the full code or better error messages
Warnings you can just ignore (symbol is never used)
the others can be a problem.
__________________
Marttt is offline
lisauro
New Member
Join Date: Oct 2020
Old 10-13-2020 , 01:13   Re: error 035: argument type mismatch (argument 1)
Reply With Quote #3

All script is over 100k lines.
I don't know, maybe this part can help to identify error.
Code:
{
	new carid = AddStaticVehicleEx(model, x, y, z, a, color_1, color_2, spawntime);
	VehicleInfo[carid][vAntiRepair]=2;
	VehicleInfo[carid][vLock]=0;
	VehicleInfo[carid][vModel] = model;
	VehicleInfo[carid][vPos_X] = x;
	VehicleInfo[carid][vPos_Y] = y;
	VehicleInfo[carid][vPos_Z] = z;
	VehicleInfo[carid][vPos_A] = a;
	VehicleInfo[carid][vColor_1] = color_1;
	VehicleInfo[carid][vColor_2] = color_2;
	VehicleInfo[carid][vSpawnTime] = spawntime;
	LinkVehicleToInterior(carid, interior);
	SetVehicleVirtualWorld(carid, world);
	VehicleInfo[carid][vTuning] = GetVehicleTuningState( model );
	switch(model)
	{
	case 430, 446, 452, 453, 454, 472, 473, 484, 493: VehicleState[carid] = VEHICLE_STATE_BOAT;
	case 417, 425, 447, 460, 469, 476, 487, 488, 497,465, 511, 512, 513, 519, 520, 548, 553,
		563, 577, 592, 593:  VehicleState[carid] = VEHICLE_STATE_PLANE;
	case 581, 522, 461, 521, 523, 463, 468, 471, 586: VehicleState[carid] = VEHICLE_STATE_BIKE;
	case 509, 481, 510: VehicleState[carid] = VEHICLE_STATE_VELIK;
	case 462,448: VehicleState[carid] = VEHICLE_STATE_MOPED;
	case 538, 537: VehicleState[carid] = VEHICLE_STATE_TRAIN;
	default: VehicleState[carid] = VEHICLE_STATE_CAR;
	}
	return carid;
}
lisauro is offline
lisauro
New Member
Join Date: Oct 2020
Old 10-13-2020 , 06:53   Re: error 035: argument type mismatch (argument 1)
Reply With Quote #4

Fixed it by myself, thanks.
lisauro is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:06.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode