Enum Error -
XStormiest - 07.08.2013
Hey again, i have a problem , i created an enum with all the land cars id
pawn Код:
enum LCars
{
400,
401,
402,
403,
404,
405,
406,
407,
408,
410,
411,
412,
413,
414,
415,
416,
418,
419,
420,
421,
422,
424,
426,
427,
429,
431,
432,
433,
436,
437,
438,
439,
440,
443,
444,
445,
448,
451,
455,
456,
458,
459,
461,
462,
463,
468,
470,
471,
474,
475,
477,
478,
479,
480,
481,
482,
489,
490,
491,
492,
494,
495,
496,
498,
499,
502,
503,
504,
505,
506,
507,
509,
510,
514,
515,
516,
517,
518,
521,
522,
523,
524,
526,
527,
528,
529,
531,
533,
534,
535,
536,
540,
541,
542,
543,
544,
546,
547,
549,
550,
551,
552,
554,
555,
556,
557,
558,
559,
560,
561,
562,
564,
565,
566,
567,
568,
573,
575,
576
578,
579,
580,
581,
582,
585,
586,
587,
589,
596,
597,
598,
599,
600,
601,
602,
603,
604,
605,
609
}
And it give error:
Код:
D:\Servere\Servere de SAMP\RPGI\gamemodes\RP.pwn(218) : error 001: expected token: "-identifier-", but found "-integer value-"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: Enum Error -
iJumbo - 07.08.2013
Enum is not an array.. you can create an array for that
pawn Код:
new LCars[] = {
400,
401,
402,
403,
404,
405,
406,
407,
408,
410,
411,
412,
413,
414,
415,
416,
418,
419,
420,
421,
422,
424,
426,
427,
429,
431,
432,
433,
436,
437,
438,
439,
440,
443,
444,
445,
448,
451,
455,
456,
458,
459,
461,
462,
463,
468,
470,
471,
474,
475,
477,
478,
479,
480,
481,
482,
489,
490,
491,
492,
494,
495,
496,
498,
499,
502,
503,
504,
505,
506,
507,
509,
510,
514,
515,
516,
517,
518,
521,
522,
523,
524,
526,
527,
528,
529,
531,
533,
534,
535,
536,
540,
541,
542,
543,
544,
546,
547,
549,
550,
551,
552,
554,
555,
556,
557,
558,
559,
560,
561,
562,
564,
565,
566,
567,
568,
573,
575,
576
578,
579,
580,
581,
582,
585,
586,
587,
589,
596,
597,
598,
599,
600,
601,
602,
603,
604,
605,
609
}
Re: Enum Error -
XStormiest - 07.08.2013
it still give error
Re: Enum Error -
Konstantinos - 07.08.2013
The line which gives the error would be nice if you could post it. What do you want to do anyway? Because if it's what I undestood, then it can be with a custom function.
Re: Enum Error -
XStormiest - 07.08.2013
I resolved it anyway ',' it was a , mistaked..., i wanted to do that: if car = land vehicles ( cars )
and then it need Driving License, because i work on RP server by %0...
I needed help to understand why it give error but now work thanks anyway
Re: Enum Error -
iJumbo - 07.08.2013
Yea my fault in this part
Re: Enum Error -
Amel_PAtomAXx - 07.08.2013
pawn Код:
enum LCars
{
400,
401,
402,
403,
404,
405,
406,
407,
408,
410,
411,
412,
413,
414,
415,
416,
418,
419,
420,
421,
422,
424,
426,
427,
429,
431,
432,
433,
436,
437,
438,
439,
440,
443,
444,
445,
448,
451,
455,
456,
458,
459,
461,
462,
463,
468,
470,
471,
474,
475,
477,
478,
479,
480,
481,
482,
489,
490,
491,
492,
494,
495,
496,
498,
499,
502,
503,
504,
505,
506,
507,
509,
510,
514,
515,
516,
517,
518,
521,
522,
523,
524,
526,
527,
528,
529,
531,
533,
534,
535,
536,
540,
541,
542,
543,
544,
546,
547,
549,
550,
551,
552,
554,
555,
556,
557,
558,
559,
560,
561,
562,
564,
565,
566,
567,
568,
573,
575,
576,
578,
579,
580,
581,
582,
585,
586,
587,
589,
596,
597,
598,
599,
600,
601,
602,
603,
604,
605,
609
}
You forgot "," at the VehicleID 576