PDA

View Full Version : input line too long


kbalor
25/08/2012, 08:37 PM
How do I change this to strcat?

error 075: input line too long (after substitutions)

Warning Line:
else if(vehmd == 496 || vehmd == 505 || vehmd == 516 || vehmd == 517 || vehmd == 518 || vehmd == 527 || vehmd == 529 || vehmd == 540 || vehmd == 546 || vehmd == 547 || vehmd == 549 || vehmd == 550 || vehmd == 551 || vehmd == 580 || vehmd == 585 || vehmd == 587 || vehmd == 589 || vehmd == 600 || vehmd == 603 || vehmd == 401 || vehmd == 410 || vehmd == 415 || vehmd == 418 || vehmd == 420 || vehmd == 436 || vehmd == 439 || vehmd == 458 || vehmd == 489 || vehmd == 491 || vehmd == 492)

Camacorn
25/08/2012, 08:43 PM
Have not tested it, so if this doesn't work, let me know.



else
new veh[128]=0;
strcat(veh,"vehmd == 496 || vehmd == 505 || vehmd == 516 || vehmd == 517 || vehmd == 518 || vehmd == 527 ||vehmd == 529 || vehmd == 540 || vehmd == 546 || vehmd == 547 || vehmd == 549 || vehmd == 550 || vehmd == 551 || ");
strcat(veh,"vehmd == 580 || vehmd == 585 || vehmd == 587 || vehmd == 589 || vehmd == 600 || vehmd == 603 || vehmd == 401 || vehmd == 410 || vehmd == 415 || vehmd == 418 || vehmd == 420 || vehmd == 436 || vehmd == 439 || vehmd == 458 || vehmd == 489 || vehmd == 491 || vehmd == 492");
if(veh)

leonardo1434
25/08/2012, 08:46 PM
new cars[] = {
496,505,516,517,518,527,529,540,546,547,549,550,55 1,580,585,587,589,600,603,401,410,415,418,420,436, 439,458,489,491,492
};


this way is much better, just make a loop through it to check something.

Nero_3D
25/08/2012, 08:49 PM
Just use your enter key


else if(
vehmd == 496 ||
vehmd == 505 ||
vehmd == 516 ||
vehmd == 517 ||
vehmd == 518 ||
vehmd == 527 ||
vehmd == 529 ||
vehmd == 540 ||
vehmd == 546 ||
// and so on
)

Alternatively you could look at bit arrays

kbalor
25/08/2012, 08:49 PM
Have not tested it, so if this doesn't work, let me know.



else
new veh[128]=0;
strcat(veh,"vehmd == 496 || vehmd == 505 || vehmd == 516 || vehmd == 517 || vehmd == 518 || vehmd == 527 ||vehmd == 529 || vehmd == 540 || vehmd == 546 || vehmd == 547 || vehmd == 549 || vehmd == 550 || vehmd == 551 || ");
strcat(veh,"vehmd == 580 || vehmd == 585 || vehmd == 587 || vehmd == 589 || vehmd == 600 || vehmd == 603 || vehmd == 401 || vehmd == 410 || vehmd == 415 || vehmd == 418 || vehmd == 420 || vehmd == 436 || vehmd == 439 || vehmd == 458 || vehmd == 489 || vehmd == 491 || vehmd == 492");
if(veh)


Got this..

error 003: declaration of a local variable must appear in a compound block
error 017: undefined symbol "veh"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
fatal error 107: too many error messages on one line

leonardo1434
25/08/2012, 08:54 PM
with strcat won't work, strcat concatenate strings, and this, can't be a string, useless you know a way to remove each thing you need(which i suppose you don't know.)

Better you use the array i've made, or nero_3d way's.

kbalor
25/08/2012, 09:05 PM
Yes! at first it looked like I need to use strcat. But nero_3d tactics did it :D

Thanks for you're reply guys! +rep to all!