Autohaus scripting HILFE

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
  • Guten tag ich bin grade dabei ein Autohaus zu skripten aber komme jetzt echt nicht dahinter was ich falsch gemacht habe.


    Bitte helft mir.


    Erros



    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18776) : error 012: invalid function call, not a valid address
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18776) : warning 215: expression has no effect
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18776) : error 001: expected token: ";", but found ")"
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18776) : error 029: invalid expression, assumed zero
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18776) : fatal error 107: too many error messages on one line


    Die Zeilen



    if(strcmp(cmdtext, "/park", true) == 0)
    {
    new inveh = 0;
    for(new i= 0;i < MAX_PLAYER_CARS;i++)
    {
    if(!IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid,FARBE_AUTOHAUS0,"Du musst in einem Auto sitzen!");
    new vehicleid = GetPlayerVehicleID(playerid);
    if(vehicleid == auto[playerid])
    {
    new Float:x,Float:y,Float:z,Float:rot;
    GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
    GetVehicleZAngle(GetPlayerVehicleID(playerid),rot);
    Autos[playerid][Park_x] = x;
    Autos[playerid][Park_y] = y;
    Autos[playerid][Park_z] = z;
    Autos[playerid][Park_rot] = rot;
    new Car[128];
    format(Car,sizeof(Car),"/Car/%s's Auto %d.txt",playername(playerid), i);// HIER IST DER ERROR
    dini_FloatSet(Car,"Car_X",Autos[playerid][Park_x]);
    dini_FloatSet(Car,"Car_y",Autos[playerid][Park_y]);
    dini_FloatSet(Car,"Car_Z",Autos[playerid][Park_z]);
    dini_FloatSet(Car,"Car_ROT",Autos[playerid][Park_rot]);
    SendClientMessage(playerid,0xFFFF00FF,"*Du hast dein Auto nun hier geparkt, du wirst es nun immer hier wieder finden.");
    }
    else
    {
    inveh = 1;
    continue;
    }
    }
    if(inveh == 1)
    {
    SendClientMessage(playerid,FARBE_AUTOHAUS0,"*Für dieses Auto besitzt du keine Schlüssel!");
    }
    return 1;
    }


    P.s Es kommen aber auch viele Warnings hoffe aber das sie nur deswegen kommen. Es ist ein Godfather edit.


    MFG
    TRONIIX


    P.S Freue mich über positive und gute Rückmeldung

    Projekt:


    German CrimeLife Testserver: 5.62.71.62:7777

  • Error ist immer noch da. Hab sehr viele Warnings drinne.


    Vllt hilft das ja die mal zu posten oder hat jemand tv?? Der mir Lust hat ein wenig zu erklären wie diese Erros zustande kommen und mir zu helfen sie zu fixxen.



    C:\Users\Darius\Desktop\Sampserver\pawno\include\M_Bot.inc(541) : warning 219: local variable "playername" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(3691) : warning 219: local variable "engine" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(3691) : warning 219: local variable "lights" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(3691) : warning 219: local variable "alarm" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(3691) : warning 219: local variable "doors" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(3691) : warning 219: local variable "bonnet" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(3691) : warning 219: local variable "boot" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(3691) : warning 219: local variable "objective" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(4069) : warning 219: local variable "modelid" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(4070) : warning 213: tag mismatch
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(4070) : warning 213: tag mismatch
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(4070) : warning 213: tag mismatch
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(4070) : warning 213: tag mismatch
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(4070) : warning 205: redundant code: constant expression is zero
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(4069) : warning 204: symbol is assigned a value that is never used: "modelid"
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(4069 -- 4078) : warning 219: local variable "modelid" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(4079) : warning 213: tag mismatch
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(4079) : warning 213: tag mismatch
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(4079) : warning 205: redundant code: constant expression is zero
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(4078) : warning 204: symbol is assigned a value that is never used: "modelid"
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(4078 -- 4087) : warning 219: local variable "modelid" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(4088) : warning 213: tag mismatch
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(4088) : warning 213: tag mismatch
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(4088) : warning 205: redundant code: constant expression is zero
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(4087) : warning 204: symbol is assigned a value that is never used: "modelid"
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(8392) : warning 219: local variable "engine" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(8392) : warning 219: local variable "lights" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(8392) : warning 219: local variable "alarm" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(8392) : warning 219: local variable "doors" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(8392) : warning 219: local variable "bonnet" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(8392) : warning 219: local variable "boot" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(8392) : warning 219: local variable "objective" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(10790) : warning 219: local variable "engine" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(10790) : warning 219: local variable "lights" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(10790) : warning 219: local variable "alarm" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(10790) : warning 219: local variable "doors" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(10790) : warning 219: local variable "bonnet" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(10790) : warning 219: local variable "boot" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(10790) : warning 219: local variable "objective" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(16909) : warning 219: local variable "playername" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18556) : warning 219: local variable "playername" shadows a variable at a preceding level
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18776) : error 012: invalid function call, not a valid address
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18776) : warning 215: expression has no effect
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18776) : error 001: expected token: ";", but found ")"
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18776) : error 029: invalid expression, assumed zero
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18776) : fatal error 107: too many error messages on one line


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



    4 Errors.


    P.S oO sind das viele :D

    Projekt:


    German CrimeLife Testserver: 5.62.71.62:7777

  • Meinst du die playername(playerid)
    Wenn ja hier ist sie.



    stock playername(playerid)
    {
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    return name;
    }

    Projekt:


    German CrimeLife Testserver: 5.62.71.62:7777

  • if(strcmp(cmdtext, "/park", true) == 0)
    {
    new inveh = 0;
    for(new i= 0;i < MAX_PLAYER_CARS;i++)
    {
    if(!IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid,FARBE_AUTOHAUS0,"Du musst in einem Auto sitzen!");
    new vehicleid = GetPlayerVehicleID(playerid);
    if(vehicleid == auto[playerid]);
    {
    new Float:x,Float:y,Float:z,Float:rot;
    GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
    GetVehicleZAngle(GetPlayerVehicleID(playerid),rot);
    Autos[playerid][Park_x] = x;
    Autos[playerid][Park_y] = y;
    Autos[playerid][Park_z] = z;
    Autos[playerid][Park_rot] = rot;
    new Car[128];
    format(Car,sizeof(Car),"/Car/%s's Auto %d.txt",playername(playerid), i);// HIER IST DER ERROR
    dini_FloatSet(Car,"Car_X",Autos[playerid][Park_x]);
    dini_FloatSet(Car,"Car_y",Autos[playerid][Park_y]);
    dini_FloatSet(Car,"Car_Z",Autos[playerid][Park_z]);
    dini_FloatSet(Car,"Car_ROT",Autos[playerid][Park_rot]);
    SendClientMessage(playerid,0xFFFF00FF,"*Du hast dein Auto nun hier geparkt, du wirst es nun immer hier wieder finden.");
    }
    else
    {
    inveh = 1;
    continue;
    }
    }
    if(inveh == 1)
    {
    SendClientMessage(playerid,FARBE_AUTOHAUS0,"*Für dieses Auto besitzt du keine Schlüssel!");
    }
    return 1;
    }


    Versuchs mal so.

  • C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18766) : error 033: array must be indexed (variable "auto")
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18766) : error 036: empty statement
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18771) : warning 213: tag mismatch
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18771) : error 033: array must be indexed (variable "Autos")
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18772) : warning 213: tag mismatch
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18772) : error 033: array must be indexed (variable "Autos")
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18773) : warning 213: tag mismatch
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18773) : error 032: array index out of bounds (variable "Autos")
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18773) : error 033: array must be indexed (variable "Autos")
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18774) : warning 213: tag mismatch
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18774) : error 032: array index out of bounds (variable "Autos")
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18774) : error 033: array must be indexed (variable "Autos")
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18776) : error 012: invalid function call, not a valid address
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18776) : warning 215: expression has no effect
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18776) : error 001: expected token: ";", but found ")"
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18776) : error 029: invalid expression, assumed zero
    C:\Users\Darius\Desktop\samp 0.3x Server\gamemodes\Greenlightfix.pwn(18776) : fatal error 107: too many error messages on one line


    Error ist imer noch da und es sind jetzt statt 4 12

    Projekt:


    German CrimeLife Testserver: 5.62.71.62:7777