need help as soon as possible plss..
#1

pawn Код:
C:\Users\hacker\Desktop\lscnr script\filterscripts\business.pwn(376) : warning 204: symbol is assigned a value that is never used: "lockdone"
C:\Users\hacker\Desktop\lscnr script\filterscripts\business.pwn(375) : warning 204: symbol is assigned a value that is never used: "done"
C:\Users\hacker\Desktop\lscnr script\filterscripts\business.pwn(351) : warning 203: symbol is never used: "idx"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Warnings.
idk how to fix this (-_-_-_-_-)
here is where i get the error

pawn Код:
CMD:lockb(playerid, params[])
{
    new string[128], idx, done, lockdone;
    if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(PlayerInfo[playerid][pBiz])
    {
        if(IsPlayerInRangeOfPoint(playerid, 2, BizInfo[PlayerInfo[playerid][pBiz]][bX], BizInfo[PlayerInfo[playerid][pBiz]][bY], BizInfo[PlayerInfo[playerid][pBiz]][bZ]))
        {
            if(!BizInfo[PlayerInfo[playerid][pBiz]][bStatus])
            {
                BizInfo[PlayerInfo[playerid][pBiz]][bStatus] = 1;
                format(string, sizeof(string), "[Business ID: %d]\nBusiness Type: %s\nBusiness Owner: %s\nStatus: %s", PlayerInfo[playerid][pBiz], RBT(PlayerInfo[playerid][pBiz]), BizInfo[PlayerInfo[playerid][pBiz]][bOwner], RBS(PlayerInfo[playerid][pBiz]));
                UpdateDynamic3DTextLabelText(BizInfo[PlayerInfo[playerid][pBiz]][bText], COLOR_WHITE, string);
                format(string, sizeof(string), "* %s takes out their business keys and unlocks it.", RPN(playerid));
                SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
                GameTextForPlayer(playerid, "~g~Business Unlocked", 3500, 3);
            }
            else if(BizInfo[PlayerInfo[playerid][pBiz]][bStatus])
            {
                BizInfo[PlayerInfo[playerid][pBiz]][bStatus] = 0;
                format(string, sizeof(string), "[Business ID: %d]\nBusiness Type: %s\nBusiness Owner: %s\nStatus: %s", PlayerInfo[playerid][pBiz], RBT(PlayerInfo[playerid][pBiz]), BizInfo[PlayerInfo[playerid][pBiz]][bOwner], RBS(PlayerInfo[playerid][pBiz]));
                UpdateDynamic3DTextLabelText(BizInfo[PlayerInfo[playerid][pBiz]][bText], COLOR_WHITE, string);
                format(string, sizeof(string), "* %s takes out their business keys and locks it.", RPN(playerid));
                SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
                GameTextForPlayer(playerid, "~r~Business Locked", 3500, 3);
            }
            done = 1;
            lockdone = 1;
            }
        }
        return 1;
    }
Reply
#2

First those aren't errors they are warnnings
Try THIS
replace this
pawn Код:
new string[128], idx, done, lockdone;
with this [Because you aren't using them.]
pawn Код:
new string[128];
Reply
#3

pawn Код:
C:\Users\hacker\Desktop\lscnr script\filterscripts\business.pwn(375) : error 017: undefined symbol "done"
C:\Users\hacker\Desktop\lscnr script\filterscripts\business.pwn(375) : warning 215: expression has no effect
C:\Users\hacker\Desktop\lscnr script\filterscripts\business.pwn(376) : error 017: undefined symbol "lockdone"
C:\Users\hacker\Desktop\lscnr script\filterscripts\business.pwn(376) : warning 215: expression has no effect
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
now it says this -_-
Reply
#4

pawn Код:
CMD:lockb(playerid, params[])
{
    new string[128], idx, done, lockdone;
    if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(PlayerInfo[playerid][pBiz])
    {
        if(IsPlayerInRangeOfPoint(playerid, 2, BizInfo[PlayerInfo[playerid][pBiz]][bX], BizInfo[PlayerInfo[playerid][pBiz]][bY], BizInfo[PlayerInfo[playerid][pBiz]][bZ]))
        {
            if(!BizInfo[PlayerInfo[playerid][pBiz]][bStatus])
            {
                BizInfo[PlayerInfo[playerid][pBiz]][bStatus] = 1;
                format(string, sizeof(string), "[Business ID: %d]\nBusiness Type: %s\nBusiness Owner: %s\nStatus: %s", PlayerInfo[playerid][pBiz], RBT(PlayerInfo[playerid][pBiz]), BizInfo[PlayerInfo[playerid][pBiz]][bOwner], RBS(PlayerInfo[playerid][pBiz]));
                UpdateDynamic3DTextLabelText(BizInfo[PlayerInfo[playerid][pBiz]][bText], COLOR_WHITE, string);
                format(string, sizeof(string), "* %s takes out their business keys and unlocks it.", RPN(playerid));
                SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
                GameTextForPlayer(playerid, "~g~Business Unlocked", 3500, 3);
                done = 0;
                lockdone = 0;
            }
            else if(BizInfo[PlayerInfo[playerid][pBiz]][bStatus])
            {
                BizInfo[PlayerInfo[playerid][pBiz]][bStatus] = 0;
                format(string, sizeof(string), "[Business ID: %d]\nBusiness Type: %s\nBusiness Owner: %s\nStatus: %s", PlayerInfo[playerid][pBiz], RBT(PlayerInfo[playerid][pBiz]), BizInfo[PlayerInfo[playerid][pBiz]][bOwner], RBS(PlayerInfo[playerid][pBiz]));
                UpdateDynamic3DTextLabelText(BizInfo[PlayerInfo[playerid][pBiz]][bText], COLOR_WHITE, string);
                format(string, sizeof(string), "* %s takes out their business keys and locks it.", RPN(playerid));
                SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
                GameTextForPlayer(playerid, "~r~Business Locked", 3500, 3);
                done = 1;
                lockdone = 1;
            }
        }
    }
    return 1;
 }
Try this?
Reply
#5

same error -_---_-
Reply
#6

I think you shouldn't define "done" and "lockdone" inside the command process. Define it at the top of the command and check if it works or not. Cause my AFK script is kind of the same and it is defined outside the command process. And i just checked my afk script, if i defined it inside the command process, it will give the same error as yours.

pawn Код:
new done, lockdone;
CMD:lockb(playerid, params[])
like this and check.
Reply
#7

You can always use #pragma unused to ignore warnings.
For example #pragma unused lockdone would ignore the warning for lockdone not being used when you compile.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)