Script Problem: Totaler Error

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
  • Ok komme mit den Errors nicht weiter.


    Hier die Fehler:



    D:\Programme\Rockstar Games\pawno\include\a_samp_ini.inc(29) : error 017: undefined symbol "strval"
    D:\Programme\Rockstar Games\pawno\include\a_samp_ini.inc(34) : error 017: undefined symbol "floatstr"
    D:\Programme\Rockstar Games\pawno\include\a_samp_ini.inc(34) : warning 213: tag mismatch
    D:\Programme\Rockstar Games\gamemodes\script.pwn(42) : error 017: undefined symbol "print"
    D:\Programme\Rockstar Games\gamemodes\script.pwn(43) : error 017: undefined symbol "print"
    D:\Programme\Rockstar Games\gamemodes\script.pwn(44) : error 017: undefined symbol "print"
    D:\Programme\Rockstar Games\gamemodes\script.pwn(49) : warning 235: public function lacks forward declaration (symbol "OnGameModeInit")
    D:\Programme\Rockstar Games\gamemodes\script.pwn(51) : error 017: undefined symbol "SetGameModeText"
    D:\Programme\Rockstar Games\gamemodes\script.pwn(52) : error 017: undefined symbol "AddPlayerClass"
    D:\Programme\Rockstar Games\gamemodes\script.pwn(56) : warning 235: public function lacks forward declaration (symbol "OnGameModeExit")
    D:\Programme\Rockstar Games\gamemodes\script.pwn(61) : warning 235: public function lacks forward declaration (symbol "OnPlayerRequestClass")
    D:\Programme\Rockstar Games\gamemodes\script.pwn(63) : error 017: undefined symbol "SetPlayerPos"
    D:\Programme\Rockstar Games\gamemodes\script.pwn(64) : error 017: undefined symbol "SetPlayerCameraPos"
    D:\Programme\Rockstar Games\gamemodes\script.pwn(65) : error 017: undefined symbol "SetPlayerCameraLookAt"
    D:\Programme\Rockstar Games\gamemodes\script.pwn(68) : warning 235: public function lacks forward declaration (symbol "OnPlayerConnect")
    D:\Programme\Rockstar Games\gamemodes\script.pwn(72) : warning 235: public function lacks forward declaration (symbol "OnPlayerDisconnect")
    D:\Programme\Rockstar Games\gamemodes\script.pwn(74) : error 017: undefined symbol "PlayerInfo"
    D:\Programme\Rockstar Games\gamemodes\script.pwn(74) : warning 215: expression has no effect
    D:\Programme\Rockstar Games\gamemodes\script.pwn(74) : error 001: expected token: ";", but found "]"
    D:\Programme\Rockstar Games\gamemodes\script.pwn(78) : error 010: invalid function or declaration
    D:\Programme\Rockstar Games\gamemodes\script.pwn(86) : error 010: invalid function or declaration
    D:\Programme\Rockstar Games\gamemodes\script.pwn(89) : warning 235: public function lacks forward declaration (symbol "OnPlayerSpawn")
    D:\Programme\Rockstar Games\gamemodes\script.pwn(90) : error 017: undefined symbol "PlayerInfo"
    D:\Programme\Rockstar Games\gamemodes\script.pwn(90) : warning 215: expression has no effect
    D:\Programme\Rockstar Games\gamemodes\script.pwn(90) : error 001: expected token: ";", but found "]"
    D:\Programme\Rockstar Games\gamemodes\script.pwn(93) : error 010: invalid function or declaration
    D:\Programme\Rockstar Games\gamemodes\script.pwn(93) : warning 215: expression has no effect
    D:\Programme\Rockstar Games\gamemodes\script.pwn(93) : warning 215: expression has no effect
    D:\Programme\Rockstar Games\gamemodes\script.pwn(93) : error 017: undefined symbol "playerid"
    D:\Programme\Rockstar Games\gamemodes\script.pwn(95) : error 010: invalid function or declaration
    D:\Programme\Rockstar Games\gamemodes\script.pwn(97) : error 010: invalid function or declaration
    D:\Programme\Rockstar Games\gamemodes\script.pwn(102) : error 017: undefined symbol "MAX_PLAYER_NAME"
    D:\Programme\Rockstar Games\gamemodes\script.pwn(102) : error 009: invalid array size (negative, zero or out of bounds)
    D:\Programme\Rockstar Games\gamemodes\script.pwn(102) : error 036: empty statement
    D:\Programme\Rockstar Games\gamemodes\script.pwn(102) : fatal error 107: too many error messages on one line


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



    24 Errors.



    So hier der Script:



    #include <a_samp_ini>


    forward OnPlayerLogin(playerid, password[]);
    forward OnPlayerRegister(playerid, password[]);
    forward OnPlayerSave(playerid);


    #define Command(%1) (!strcmp(cmdtext, %1, true, strlen(%1)) && strdel(cmdtext, 0, strlen(%1) + 1) == true)



    #if defined FILTERSCRIPT


    enum PInfo
    {
    pPassword[16],
    pLevel,
    pMoney,
    Float:pX,
    Float:pY,
    Float:pZ,
    pIsPlayerLoggedIn
    }
    new PlayerInfo[MAX_PLAYERS][PInfo];
    new str[128];
    public OnFilterScriptInit()


    {
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }


    #else


    main()
    {
    print("\n----------------------------------");
    print(" Kais Script");
    print("----------------------------------\n");
    }


    #endif


    public OnGameModeInit()
    {
    SetGameModeText("Kais legendary Script!");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
    }


    public OnGameModeExit()
    {
    return 1;
    }


    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    }


    public OnPlayerConnect(playerid)
    {


    }
    public OnPlayerDisconnect(playerid, reason)


    if(PlayerInfo[playerid][pIsPlayerLoggedIn] == 1)
    {
    {
    OnPlayerSave(playerid);
    PlayerInfo[playerid][pPassword] = 0;
    PlayerInfo[playerid][pLevel] = 0;
    PlayerInfo[playerid][pMoney] = 0;
    PlayerInfo[playerid][pX] = 0.0;
    PlayerInfo[playerid][pY] = 0.0;
    PlayerInfo[playerid][pZ] = 0.0;
    PlayerInfo[playerid][pIsPlayerLoggedIn] = 0;
    }
    return 1;
    }


    public OnPlayerSpawn(playerid)
    if(PlayerInfo[playerid][pIsPlayerLoggedIn] == 0)
    {
    {
    format(str, sizeof(str), "%s wurde gekickt da er unangemeldet gespawn ist", GetPlayerNameEx(playerid));
    SendClientMessageToAll(COLOR_LIGHT_RED, str);
    return 0;
    }
    return 1;
    }


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


    public OnPlayerDeath(playerid, killerid, reason)
    {
    return 1;
    }


    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }


    public OnVehicleDeath(vehicleid, killerid)
    {
    return 1;
    }


    public OnPlayerText(playerid, text[])
    {
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if(strcmp(cmdtext,"/rs1",true)==0)
    {
    SetPlayerPos(playerid,659.9648,-1278.6262,13.2493);
    SendClientMessage(playerid,0x0000FFFF,"Du wurdest Teleportiert.");
    return 1;
    }
    if(strcmp(cmdtext,"/lspd",true)==0)
    {
    SetPlayerPos(playerid,1529.7750,-1687.9412,5.9373);
    SendClientMessage(playerid,0x0000FFFF,"Du wurdest Teleportiert.");
    return 1;
    }
    if(strcmp(cmdtext,"/restart",true)==0)
    {
    SendRconCommand("gmx");
    return 1;
    }
    if(Command("/login"))
    {
    if(PlayerInfo[playerid][pIsPlayerLoggedIn] == 1) return SendClientMessage(playerid, COLOR_LIGHT_WHITE, "Du bist schon angemeldet.");
    format(str, sizeof(str), "Accounts\\%s.ini", GetPlayerNameEx(playerid));
    if(!fexist(str)) return SendClientMessage(playerid, COLOR_YELLOW, "Account wurde nicht gefunden, du kannst dich nicht einloggen.");
    new strPW[16];
    if(sscanf(cmdtext, "s", strPW)) return SendClientMessage(playerid, COLOR_LIGHT_WHITE, "[SERVER] Benutzung: /login [Passwort]");
    OnPlayerLogin(playerid, strPW);
    return 1;
    }


    if(Command("/register"))
    {
    if(PlayerInfo[playerid][pIsPlayerLoggedIn] == 1) return SendClientMessage(playerid, COLOR_LIGHT_WHITE, "Du bist schon angemeldet.");
    format(str, sizeof(str), "Accounts\\%s.ini", GetPlayerNameEx(playerid));
    if(fexist(str)) return SendClientMessage(playerid, COLOR_YELLOW, "Account wurde gefunden, du kannst dich nicht registrieren.");
    new strPW[16];
    if(sscanf(cmdtext, "s", strPW)) return SendClientMessage(playerid, COLOR_LIGHT_WHITE, "[SERVER] Benutzung: /register [Passwort]");
    OnPlayerRegister(playerid, strPW);
    return 1;
    }
    return 0;
    }


    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    return 1;
    }


    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    return 1;
    }


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    return 1;
    }


    public OnPlayerEnterCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerEnterRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnRconCommand(cmd[])
    {
    return 1;
    }


    public OnPlayerRequestSpawn(playerid)
    {
    if(PlayerInfo[playerid][pIsPlayerLoggedIn] == 0)
    {
    SendClientMessage(playerid, 0xAAAAAAAA, "Du kannst nicht unangemeldet spawnen.");
    return 0;
    }
    return 1;
    }


    public OnObjectMoved(objectid)
    {
    return 1;
    }


    public OnPlayerObjectMoved(playerid, objectid)
    {
    return 1;
    }


    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    return 1;
    }


    public OnVehicleMod(playerid, vehicleid, componentid)
    {
    return 1;
    }


    public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
    {
    return 1;
    }


    public OnVehicleRespray(playerid, vehicleid, color1, color2)
    {
    return 1;
    }


    public OnPlayerSelectedMenuRow(playerid, row)
    {
    return 1;
    }


    public OnPlayerExitedMenu(playerid)
    {
    return 1;
    }


    public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
    {
    return 1;
    }


    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    return 1;
    }


    public OnRconLoginAttempt(ip[], password[], success)
    {
    return 1;
    }


    public OnPlayerUpdate(playerid)
    {
    return 1;
    }


    public OnPlayerStreamIn(playerid, forplayerid)
    {
    return 1;
    }


    public OnPlayerStreamOut(playerid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamIn(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamOut(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {


    }


    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;
    }


    public OnPlayerRegister(playerid, password[])
    {
    format(str, sizeof(str), "Accounts\\%s.ini", GetPlayerNameEx(playerid));
    SaveString("Account", "Password", password, str);
    SaveInteger("Account", "Level", random(10), str);
    SaveInteger("Account", "Money", random(5000), str);
    SaveFloat("Account", "PosX", 1603.928466, str);
    SaveFloat("Account", "PosY", 1820.088500, str);
    SaveFloat("Account", "PosZ", 10.828001, str);


    SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Du hast dich erfolgreich registriert, du wirst nun automatich eingeloggt.");
    OnPlayerLogin(playerid, password);


    return 1;
    }


    public OnPlayerLogin(playerid, password[])
    {
    format(str, sizeof(str), "Accounts\\%s.ini", GetPlayerNameEx(playerid));
    LoadString("Account", "Password", "0", PlayerInfo[playerid][pPassword], str);


    if(!strcmp(PlayerInfo[playerid][pPassword], password, false))
    {


    PlayerInfo[playerid][pLevel] = LoadInteger("Account", "Level", "0", str);
    PlayerInfo[playerid][pMoney] = LoadInteger("Account", "Money", "0", str);
    PlayerInfo[playerid][pX] = LoadFloat("Account", "PosX", "0.0", str);
    PlayerInfo[playerid][pY] = LoadFloat("Account", "PosY", "0.0", str);
    PlayerInfo[playerid][pZ] = LoadFloat("Account", "PosZ", "0.0", str);


    PlayerInfo[playerid][pIsPlayerLoggedIn] = 1;
    SpawnPlayer(playerid);
    SetPlayerScore(playerid, PlayerInfo[playerid][pLevel));
    GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]);
    SetPlayerPos(playerid, PlayerInfo[playerid][pX], PlayerInfo[playerid][pY], PlayerInfo[playerid][pZ);


    format(str, sizeof(str), "Willkommen zurück %s", GetPlayerNameEx(playerid));
    SendClientMessage(playerid, COLOR_WHITE, str);
    }else{
    SendClientMessage(playerid, COLOR_LIGHT_RED, "Das Passwort war nocht korrekt.");
    Kick(playerid);
    }
    return 1;
    }


    public OnPlayerSave(playerid)
    {
    format(str, sizeof(str), "Accounts\\%s.ini", GetPlayerNameEx(playerid));
    SaveString("Account", "Password", PlayerInfo[playerid][pPassword], str);
    SaveInteger("Account", "Level", PlayerInfo[playerid][pLevel], str);
    SaveInteger("Account", "Money", PlayerInfo[playerid][pMoney], str);


    new Float:X, Float:Y, Float:Z
    GetPlayerPos(playerid, X, Y, Z);


    SaveFloat("Account", "PosX", X, str);
    SaveFloat("Account", "PosY", Y, str);
    SaveFloat("Account", "PosZ", Z, str);


    return 1;
    }


    Danke für eure Hilfe!


    Mfg Kai


  • da kapier ich grad bahnhof oO

    526C4Hj.png Mit freundlichen Grüßen,
    Noneatme