Error im script

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Habe hier an der stelle einen Error


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate==PLAYER_STATE_DRIVER)
    {
    if(GetPVarInt(playerid,"Führerschein") == 0 && IstEinAuto(GetPlayerVehicleID(playerid)))
    {
    SendClientMessage(playerid,FARBE_GELB,"Du hast kein Führerschein!");
    RemovePlayerFromVehicle(playerid);
    }
    else if(GetPVarInt(playerid,"LKW Schein") == 0 && IstEinLKW(GetPlayerVehicleID(playerid)))
    {
    SendClientMessage(playerid,FARBE_GELB,"Du hast keinen LKW Schein!");
    RemovePlayerFromVehicle(playerid);
    }
    else if(GetPVarInt(playerid,"Heli Schein") == 0 && IstEinHeli(GetPlayerVehicleID(playerid)))
    {
    SendClientMessage(playerid,FARBE_GELB,"Du hast keinen Heli Schein!");
    RemovePlayerFromVehicle(playerid);
    }
    }
    return 1;
    }


    hier der error


    C:\Users\Florian\Desktop\MeinSCRIPT SERVER\gamemodes\GRL.pwn(654 -- 655) : warning 215: expression has no effect
    C:\Users\Florian\Desktop\MeinSCRIPT SERVER\gamemodes\GRL.pwn(655) : error 001: expected token: ";", but found "if"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.


    die zeilen sind diese


    else if(GetPVarInt(playerid,"LKW Schein") == 0 && IstEinLKW(GetPlayerVehicleID(playerid)))
    {

  • Mach es so


    Du musst das immer mit einem Semikolon beenden, also damit ;


    Die Kritik an anderen hat noch keinem die eigene Leistung erspart.

    – Noël Coward

  • C:\Users\Florian\Desktop\MeinSCRIPT SERVER\gamemodes\GRL.pwn(349) : error 001: expected token: ")", but found ";"
    C:\Users\Florian\Desktop\MeinSCRIPT SERVER\gamemodes\GRL.pwn(349) : error 036: empty statement
    C:\Users\Florian\Desktop\MeinSCRIPT SERVER\gamemodes\GRL.pwn(354) : error 029: invalid expression, assumed zero
    C:\Users\Florian\Desktop\MeinSCRIPT SERVER\gamemodes\GRL.pwn(354) : warning 215: expression has no effect
    C:\Users\Florian\Desktop\MeinSCRIPT SERVER\gamemodes\GRL.pwn(354) : error 001: expected token: ";", but found "if"
    C:\Users\Florian\Desktop\MeinSCRIPT SERVER\gamemodes\GRL.pwn(354) : error 001: expected token: ")", but found ";"
    C:\Users\Florian\Desktop\MeinSCRIPT SERVER\gamemodes\GRL.pwn(354) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    6 Errors.


    und ich hab immer mit semikolon beendet :)

  • wenn ich die zeile weg nehme klappt es 100%


    else if(GetPVarInt(playerid,"Heli Schein") == 0 && IstEinHeli(GetPlayerVehicleID(playerid)))
    {
    SendClientMessage(playerid,FARBE_GELB,"Du hast keinen Heli Schein!");
    RemovePlayerFromVehicle(playerid);
    }

  • Der fehler liegt bei den LKW richtig? Könnte ich bitte mal den stock IstEinLKW oder wie der hies sehen?

  • es liegt am heli


    stock IstEinHeli(carid)
    {
    carid == GetVehicleModel(carid)
    if(carid == 417 || carid == 425 || carid == 447 || carid == 469 || carid == 476 || carid == 487 || carid == 488
    || carid == 497 || carid == 511 || carid == 512 || carid == 513 || carid == 519 || carid == 520 || carid == 548
    || carid == 553 || carid == 563 || carid == 577 || carid == 592 || carid == 593)
    {
    return 1;
    }
    return 0;
    }

  • stock IstEinHeli(carid2)
    {
    new carid == GetVehicleModel(carid2)
    if(carid == 417 || carid == 425 || carid == 447 || carid == 469 || carid == 476 || carid == 487 || carid == 488
    || carid == 497 || carid == 511 || carid == 512 || carid == 513 || carid == 519 || carid == 520 || carid == 548
    || carid == 553 || carid == 563 || carid == 577 || carid == 592 || carid == 593)
    {
    return 1;
    }
    return 0;
    }

  • hab alle nun so


    Spoiler anzeigen
    stock IstEinMotorrad(carid5)
    {
    new carid5 == GetVehicleModel(carid5)
    if(carid5 == 448 || carid5 == 461 || carid5 == 462 || carid5 == 463 || carid5 == 468 || carid5 == 521 || carid5 == 522
    || carid5 == 523 || carid5 == 581 || carid5 == 586)
    {
    return 1;
    }
    return 0;
    }
    stock IstEinBoot(carid4)
    {
    new carid == GetVehicleModel(carid4)
    if(carid4 == 430 || carid4 == 446 || carid4 == 452 || carid4 == 453 || carid4 == 454 || carid4 == 472 || carid4 == 473
    || carid4 == 484 || carid4 == 493 || carid4 == 595)
    {
    return 1;
    }
    return 0;
    }
    stock IstEinHeli(carid3)
    {
    new carid == GetVehicleModel(carid3)
    if(carid3 == 417 || carid3 == 425 || carid3 == 447 || carid3 == 469 || carid3 == 476 || carid3 == 487 || carid3 == 488
    || carid3 == 497 || carid3 == 511 || carid3 == 512 || carid3 == 513 || carid3 == 519 || carid3 == 520 || carid3 == 548
    || carid3 == 553 || carid3 == 563 || carid3 == 577 || carid3 == 592 || carid3 == 593)
    {
    return 1;
    }
    return 0;
    }
    stock IstEinLKW(carid2)
    {
    new carid = GetVehicleModel(carid2);
    if(carid2 == 403 || carid2 == 406 || carid2 == 433 || carid2 == 435 || carid2 == 443 || carid2 == 450 || carid2 == 450
    || carid2 == 455 || carid2 == 514 || carid2 == 515 || carid2 == 524 || carid2 == 573 || carid2 == 578 || carid2 == 584
    || carid2 == 591)
    {
    return 1;
    }
    return 0;
    }
    stock IstEinAuto(carid)
    {
    new carid = GetVehicleModel(carid);
    if(carid == 400 || carid == 401 || carid == 402 || carid == 404 || carid == 405 || carid == 406
    || carid == 407 || carid == 409 || carid == 410 || carid == 411 || carid == 412 || carid == 413
    || carid == 414 || carid == 415 || carid == 416 || carid == 418 || carid == 419 || carid == 420 || carid == 421
    || carid == 422 || carid == 423 || carid == 424 || carid == 426 || carid == 427 || carid == 428 || carid == 429
    || carid == 431 || carid == 432 || carid == 434 || carid == 436 || carid == 437 || carid == 438
    || carid == 439 || carid == 440 || carid == 442 || carid == 445 || carid == 451
    || carid == 456 || carid == 458 || carid == 459 || carid == 466 || carid == 467 || carid == 470 || carid == 474
    || carid == 475 || carid == 477 || carid == 478 || carid == 479 || carid == 480 || carid == 482 || carid == 483
    || carid == 489 || carid == 490 || carid == 491 || carid == 492 || carid == 495 || carid == 496 || carid == 498
    || carid == 499 || carid == 500 || carid == 505 || carid == 506 || carid == 507 || carid == 508
    || carid == 516 || carid == 517 || carid == 518 || carid == 525 || carid == 526
    || carid == 527 || carid == 528 || carid == 529 || carid == 531 || carid == 532 || carid == 533 || carid == 534
    || carid == 535 || carid == 536 || carid == 540 || carid == 541 || carid == 542 || carid == 543 || carid == 544
    || carid == 545 || carid == 546 || carid == 547 || carid == 549 || carid == 550 || carid == 551 || carid == 552
    || carid == 554 || carid == 555 || carid == 558 || carid == 559 || carid == 560 || carid == 561 || carid == 562
    || carid == 565 || carid == 566 || carid == 567 || carid == 568 || carid == 575 || carid == 576 || carid == 579
    || carid == 580 || carid == 582 || carid == 585 || carid == 587 || carid == 588 || carid == 589
    || carid == 596 || carid == 597 || carid == 598 || carid == 599 || carid == 600 || carid == 601 || carid == 602
    || carid == 603 || carid == 604 || carid == 605 || carid == 609)
    {
    return 1;
    }
    return 0;
    }


    Errors


    C:\Users\Florian\Desktop\MeinSCRIPT SERVER\gamemodes\GRL.pwn(644) : warning 219: local variable "carid5" shadows a variable at a preceding level
    C:\Users\Florian\Desktop\MeinSCRIPT SERVER\gamemodes\GRL.pwn(644) : error 001: expected token: ";", but found "=="
    C:\Users\Florian\Desktop\MeinSCRIPT SERVER\gamemodes\GRL.pwn(644) : error 029: invalid expression, assumed zero
    C:\Users\Florian\Desktop\MeinSCRIPT SERVER\gamemodes\GRL.pwn(645) : error 001: expected token: ";", but found "if"
    C:\Users\Florian\Desktop\MeinSCRIPT SERVER\gamemodes\GRL.pwn(642) : warning 203: symbol is never used: "carid5"
    C:\Users\Florian\Desktop\MeinSCRIPT SERVER\gamemodes\GRL.pwn(675) : warning 204: symbol is assigned a value that is never used: "carid"
    C:\Users\Florian\Desktop\MeinSCRIPT SERVER\gamemodes\GRL.pwn(675 -- 686) : warning 219: local variable "carid" shadows a variable at a preceding level
    C:\Users\Florian\Desktop\MeinSCRIPT SERVER\gamemodes\GRL.pwn(684) : warning 203: symbol is never used: "carid"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    3 Errors.