Jump to content
  • 0

[Ajutor] Eroare compilare , cmd si tmp! :(


Menthool.

Question

Nick: Menthooll

Problema: Problema pe care o intalnesc la compilare este accea cu undefined symbol "tmp" si cmd

Erori / warnings: [pawn]

C:\Documents and Settings\mnt\Desktop\Gamemode\pawno\saints.pwn(26182) : error 017: undefined symbol "tmp"

C:\Documents and Settings\mnt\Desktop\Gamemode\pawno\saints.pwn(26182) : error 017: undefined symbol "cmd"

C:\Documents and Settings\mnt\Desktop\Gamemode\pawno\saints.pwn(26183) : error 017: undefined symbol "tmp"

C:\Documents and Settings\mnt\Desktop\Gamemode\pawno\saints.pwn(26193) : error 017: undefined symbol "tmp"

C:\Documents and Settings\mnt\Desktop\Gamemode\pawno\saints.pwn(26193) : error 017: undefined symbol "cmd"

C:\Documents and Settings\mnt\Desktop\Gamemode\pawno\saints.pwn(26194) : error 017: undefined symbol "tmp"

C:\Documents and Settings\mnt\Desktop\Gamemode\pawno\saints.pwn(26200) : error 017: undefined symbol "tmp"

C:\Documents and Settings\mnt\Desktop\Gamemode\pawno\saints.pwn(26201) : error 017: undefined symbol "tmp"

C:\Documents and Settings\mnt\Desktop\Gamemode\pawno\saints.pwn(26201) : error 017: undefined symbol "cmd"

C:\Documents and Settings\mnt\Desktop\Gamemode\pawno\saints.pwn(26202) : error 017: undefined symbol "tmp"

C:\Documents and Settings\mnt\Desktop\Gamemode\pawno\saints.pwn(26209) : error 017: undefined symbol "tmp"

[/pawn]

Lini/script:

Linia 26182 [pawn]tmp = strtok(cmd, idx);[/pawn]

Linia 26183 [pawn]if(!strlen(tmp))[/pawn]

S.M

Este vorba despre comanda /setstat [pentru mysql]

[pawn]CMD:setstat(playerid, params[])

{

        if(IsPlayerConnected(playerid)) {

            tmp = strtok(cmd, idx);

            if(!strlen(tmp))

{

                        SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /setstat [playerid/PartOfName] [statcode] [amount]");

                        SendClientMessage(playerid, COLOR_GRAD4, "|1 Level |2 BankAccount |3 UpgradePoints |4 Connect Time ");

                        SendClientMessage(playerid, COLOR_GRAD3, "|5 Fpunish |7 RespectPoints |8 HouseKey |9 BizKey |10 DonateRank");

            return 1;

            }

            playerid = ReturnUser(tmp);

            if(IsPlayerConnected)

{

                {

                    tmp = strtok(cmd, idx);

                    if(!strlen(tmp)) {

                        SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /setstat [playerid/PartOfName] [statcode] [amount]");

                        SendClientMessage(playerid, COLOR_GRAD4, "|1 Level |2 BankAccount |3 UpgradePoints |4 Model |5 BankAccount");

                        SendClientMessage(playerid, COLOR_GRAD3, "|6 PhoneNumber ");

                    }

                    new stat;

                    stat = strval(tmp);

                    tmp = strtok(cmd, idx);

                    if(!strlen(tmp)) {

                        SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /setstat [playerid/PartOfName] [statcode] [amount]");

                        SendClientMessage(playerid, COLOR_GRAD4, "|1 Level |2 Bank Account|3 Robs Point |4 Connect Time ");

                        SendClientMessage(playerid, COLOR_GRAD3, "|5 FPunish ");

                        return 1;

                    }

                    new amount;

                    amount = strval(tmp);

                    if (PlayerInfo[playerid][pAdmin] >= 10) {

                    new string[128];

                    switch (stat) {

                            case 1:

                            {

                                PlayerInfo[playerid][pLevel] = amount;

                                format(string, sizeof(string), "  The Player Was Set To Level %d", amount);

                                SetPlayerScore(playerid,amount);

                                Update(playerid, pLevelx);

                            }

                            case 2:

                            {

                                PlayerInfo[playerid][pAccount] = amount;

                                format(string, sizeof(string), "  The Player Account Was Set To $%d", amount);

                                Update(playerid, pBank);

}

                            case 3:

                            {

                                PlayerInfo[playerid][pRob] = amount;

                                format(string, sizeof(string), "  The Player Was Set To %d Robs Points", amount);

Update(playerid, pRobx);

}

                            case 4:

                            {

                                PlayerInfo[playerid][pConnectTime] = amount;

                                format(string, sizeof(string), "  The Player Was Set Connected Time to  %d", amount);

Update(playerid, pConnectTimex);

}

      case 5:

                            {

                                PlayerInfo[playerid][pFpunish] = amount;

                                format(string, sizeof(string), "  The Player Was Set Connected Time to  %d", amount);

Update(playerid, pFpunishx);

}

                            default:

                            {

                                format(string, sizeof(string), "  Invalid Stat Code", amount);

                            }

                        }

                        SendClientMessage(playerid, COLOR_GRAD1, string);

                    }

                    else

{

                        SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");

}                                // Not valid ID

            }                                    //Not connected

        }

}

return 1;

}[/pawn]

Ai incercat sa rezolvi singur ?:Da

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.