19 Errors.

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
  • C:\Users\555\Desktop\GRP\gamemodes\new.pwn(283) : error 017: undefined symbol "SaveString"C:\Users\555\Desktop\GRP\gamemodes\new.pwn(284) : error 017: undefined symbol "SaveInteger"C:\Users\555\Desktop\GRP\gamemodes\new.pwn(285) : error 017: undefined symbol "SaveInteger"C:\Users\555\Desktop\GRP\gamemodes\new.pwn(286) : error 017: undefined symbol "SaveFloat"C:\Users\555\Desktop\GRP\gamemodes\new.pwn(287) : error 017: undefined symbol "SaveFloat"C:\Users\555\Desktop\GRP\gamemodes\new.pwn(288) : error 017: undefined symbol "SaveFloat"C:\Users\555\Desktop\GRP\gamemodes\new.pwn(299) : error 017: undefined symbol "LoadString"C:\Users\555\Desktop\GRP\gamemodes\new.pwn(304) : error 017: undefined symbol "LoadInteger"C:\Users\555\Desktop\GRP\gamemodes\new.pwn(305) : error 017: undefined symbol "LoadInteger"C:\Users\555\Desktop\GRP\gamemodes\new.pwn(306) : error 017: undefined symbol "LoadFloat"C:\Users\555\Desktop\GRP\gamemodes\new.pwn(307) : error 017: undefined symbol "LoadFloat"C:\Users\555\Desktop\GRP\gamemodes\new.pwn(308) : error 017: undefined symbol "LoadFloat"C:\Users\555\Desktop\GRP\gamemodes\new.pwn(330) : error 017: undefined symbol "SaveString"C:\Users\555\Desktop\GRP\gamemodes\new.pwn(331) : error 017: undefined symbol "SaveInteger"C:\Users\555\Desktop\GRP\gamemodes\new.pwn(332) : error 017: undefined symbol "SaveInteger"C:\Users\555\Desktop\GRP\gamemodes\new.pwn(335) : error 001: expected token: ";", but found "-identifier-"C:\Users\555\Desktop\GRP\gamemodes\new.pwn(337) : error 017: undefined symbol "SaveFloat"C:\Users\555\Desktop\GRP\gamemodes\new.pwn(338) : error 017: undefined symbol "SaveFloat"C:\Users\555\Desktop\GRP\gamemodes\new.pwn(339) : error 017: undefined symbol "SaveFloat"Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    19 Errors.
    Bin eben in der Sprache eingestiegen, und habe gleich versuchst ein Login und Register System zu schreiben.
    Erfolgslos, hoffe ihr könnt mir helfen.


    Bin mir nicht sicher ob ihr die Zeilen braucht.


    Gruß



    Spoiler anzeigen
    (edit): RS

    Einmal editiert, zuletzt von Blaze™ ()

  • 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, DARKBLUE, "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, 0xAFAFAFAA, str); } else { SendClientMessage(playerid, 0xAA3333AA, "Das Passwort ist falsch"); 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;}

  • 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, DARKBLUE, "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, 0xAFAFAFAA, str);
    }
    else
    {
    SendClientMessage(playerid, 0xAA3333AA, "Das Passwort ist falsch");
    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;
    }

  • mmhh,ich muss sagen,dass mir die art(über Publics)nicht geheuer ist,ich vertraue dem nicht..mache es lieber über Stocks,aber deine Sache


    Zu den Problemen..du hast SaveInteger verwendet..warum?hast du es richtig definiert?

  • C:\Users\555\Desktop\GRP\gamemodes\new.pwn(285) : error 012: invalid function call, not a valid address
    C:\Users\555\Desktop\GRP\gamemodes\new.pwn(285) : warning 215: expression has no effect
    C:\Users\555\Desktop\GRP\gamemodes\new.pwn(285) : warning 215: expression has no effect
    C:\Users\555\Desktop\GRP\gamemodes\new.pwn(285) : warning 215: expression has no effect
    C:\Users\555\Desktop\GRP\gamemodes\new.pwn(285) : warning 215: expression has no effect
    C:\Users\555n\Desktop\GRP\gamemodes\new.pwn(285) : error 001: expected token: ";", but found ")"
    C:\Users\555\Desktop\GRP\gamemodes\new.pwn(285) : error 029: invalid expression, assumed zero
    C:\Users\555\Desktop\GRP\gamemodes\new.pwn(285) : 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.


    Zeile 285: SaveString("Account", "Password", password, str);

  • 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, DARKBLUE, "Du hast dich erfolgreich registriert, du wirst nun automatich eingeloggt.");
    OnPlayerLogin(playerid, password);


    return 1;
    }