Safebox erstellen für Drogen und Mats

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
  • Hallo ich brauch hierbei hilfe ich hab dieses Problem



    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(20221) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(20240) : warning 219: local variable "matss" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(20270) : warning 219: local variable "drugss" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(20305) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(20324) : warning 219: local variable "matss" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(20354) : warning 219: local variable "drugss" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(21153) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(21233) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(23743) : warning 202: number of arguments does not match definition
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(23743) : warning 202: number of arguments does not match definition
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(23743) : warning 202: number of arguments does not match definition
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(23743) : warning 202: number of arguments does not match definition
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(23743) : warning 202: number of arguments does not match definition
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(23743) : warning 202: number of arguments does not match definition
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(23743) : warning 202: number of arguments does not match definition
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(37584) : warning 219: local variable "matss" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(37711) : warning 219: local variable "matss" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(37753) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(39095) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(39181) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(39505) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(40133) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(40852) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(41145) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(41544) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(41770) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(42075) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(42125) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(4239) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(4309) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(44320) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(48365) : warning 219: local variable "x_nr" shadows a variable at a preceding level
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57673) : error 021: symbol already defined: "pMats"
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57675) : error 021: symbol already defined: "pBoxMats"
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57676) : error 021: symbol already defined: "pBoxDrugs"
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57686) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(5768) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57690) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57693) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57694) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57700) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57702) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57705) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57710) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57713) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57714) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57719) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57721) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57724) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57730) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57732) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57735) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57740) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57743) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57744) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57749) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57751) : error 010: invalid function or declaration
    C:\Users\Dutchman\Desktop\Neuer Ordner (2)\gamemodes\Script.pwn(57754) : error 010: invalid function or declaration


    ich will nur die errors entfernt haben


    //-----------------------------------------SafeBox-----------------------------------------
    if(strcmp(cmd,"/put",true)==0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerToPoint(25.0,playerid,2513.334717,-1676.568726,12.541371) || PlayerToPoint(3.0,playerid,1941.511108,-1120.094360,25.473835) || PlayerToPoint(3.0,playerid,1123.634399,-2044.185425,73.426231) || PlayerToPoint(3.0,playerid,726.177185,-1441.119629,16.691856) || PlayerToPoint(3.0,playerid,2605.198730,1680.478271,9.973106) || PlayerToPoint(3.0,playerid,-35.879395, 59.165298, 2.113732))
    {
    new x_nr[256];
    x_nr = strtok(cmdtext, idx);
    if(!strlen(x_nr))
    {
    SendClientMessage(playerid, COLOR_WHITE, "|__________________ Put __________________|");
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /put [name]");
    SendClientMessage(playerid, COLOR_GREY, "Available names: Mats, Drugs");
    SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
    return 1;
    }
    if(strcmp(x_nr,"Mats",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
    format(string, sizeof(string), " You Have %d Mats on you.", PlayerInfo[playerid][pMats]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    new matss;
    matss = strval(tmp);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
    format(string, sizeof(string), " You Have %d Mats on you.", PlayerInfo[playerid][pMats]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    if(matss > PlayerInfo[playerid][pMats])
    {
    SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
    return 1;
    }
    PlayerInfo[playerid][pMats] -= matss;
    PlayerInfo[playerid][pBoxMats] += matss;
    format(string, sizeof(string), " %d materials deposited!", matss);
    SendClientMessage(playerid, COLOR_GRAD4, string);
    return 1;
    }
    else if(strcmp(x_nr,"Drugs",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
    format(string, sizeof(string), " You Have %d Drugs on you.", PlayerInfo[playerid][pDrugs]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    new drugss;
    drugss = strval(tmp);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
    format(string, sizeof(string), " You Have %d Drugs on you.", PlayerInfo[playerid][pDrugs]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    if(drugss > PlayerInfo[playerid][pDrugs])
    {
    SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
    return 1;
    }
    PlayerInfo[playerid][pDrugs] -= drugss;
    PlayerInfo[playerid][pBoxDrugs] += drugss;
    format(string, sizeof(string), " %d Drugs deposited!", drugss);
    SendClientMessage(playerid, COLOR_GRAD4, string);
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " You are not in the safebox place !");
    return 1;
    }
    }//not connected
    return 1;
    }
    if(strcmp(cmd,"/gtake",true)==0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerToPoint(25.0,playerid,2513.334717,-1676.568726,12.541371) || PlayerToPoint(3.0,playerid,1941.511108,-1120.094360,25.473835) || PlayerToPoint(3.0,playerid,1123.634399,-2044.185425,73.426231) || PlayerToPoint(3.0,playerid,726.177185,-1441.119629,16.691856) || PlayerToPoint(3.0,playerid,2605.198730,1680.478271,9.973106) || PlayerToPoint(3.0,playerid,-35.879395, 59.165298, 2.113732)) //Hier deine coords
    {
    new x_nr[256];
    x_nr = strtok(cmdtext, idx);
    if(!strlen(x_nr))
    {
    SendClientMessage(playerid, COLOR_WHITE, "|__________________ Put __________________|");
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gtake [name]");
    SendClientMessage(playerid, COLOR_GREY, "Available names: Mats, Drugs");
    SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
    return 1;
    }
    if(strcmp(x_nr,"Mats",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
    format(string, sizeof(string), " You Have %d Mats on your SafeBox.", PlayerInfo[playerid][pBoxMats]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    new matss;
    matss = strval(tmp);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
    format(string, sizeof(string), " You Have %d Mats on your SafeBox.", PlayerInfo[playerid][pBoxMats]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    if(matss > PlayerInfo[playerid][pBoxMats])
    {
    SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
    return 1;
    }
    PlayerInfo[playerid][pBoxMats] -= matss;
    PlayerInfo[playerid][pMats] += matss;
    format(string, sizeof(string), " %d materials Taken!", matss);
    SendClientMessage(playerid, COLOR_GRAD4, string);
    return 1;
    }
    else if(strcmp(x_nr,"Drugs",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
    format(string, sizeof(string), " You Have %d Drugs on your SafeBox.", PlayerInfo[playerid][pBoxDrugs]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    new drugss;
    drugss = strval(tmp);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
    format(string, sizeof(string), " You Have %d Drugs on your SafeBox.", PlayerInfo[playerid][pBoxDrugs]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    if(drugss > PlayerInfo[playerid][pBoxDrugs])
    {
    SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
    return 1;
    }
    PlayerInfo[playerid][pBoxDrugs] -= drugss;
    PlayerInfo[playerid][pDrugs] += drugss;
    format(string, sizeof(string), " %d Drugs Taken!", drugss);
    SendClientMessage(playerid, COLOR_GRAD4, string);
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " You are not in the safebox place !");
    return 1;
    }
    }
    return 1;
    }


    //-------------------------------------SafeBox--------------------------------------