Jump to content

Question

Posted

Nick: RealG.

Problema: Undefined problems

Erori / warnings:

D:\Randoms\Server de Samp\gamemodes\rpg.pwn(4203) : error 017: undefined symbol "tmp"
D:\Randoms\Server de Samp\gamemodes\rpg.pwn(4204) : error 017: undefined symbol "tmp"
D:\Randoms\Server de Samp\gamemodes\rpg.pwn(4204) : error 035: argument type mismatch (argument 2)
D:\Randoms\Server de Samp\gamemodes\rpg.pwn(4205) : error 017: undefined symbol "tmp"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Lini/script: [pawn] tmp = strtok(cmdtext, idx);

if(!strlen(tmp)) return SendClientMessage(playerid, "/makemoneybag [amount]");

new amount = strval(tmp);

if(amount < 1) return SendClientMessage(playerid, WHITE, "cannot go below 1.");[/pawn]

[pawn]    if(strcmp(cmd, "/makemoneybag", true) == 0 || strcmp(cmd, "/moneybag", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

        if(playerVariables[playerid][pAdminLevel] < 6)

        {

        return SendClientMessage(playerid, GREY, "    You are not authorized to use this command.");

}

tmp = strtok(cmdtext, idx);

if(!strlen(tmp)) return SendClientMessage(playerid, "/makemoneybag [amount]");

new amount = strval(tmp);

if(amount < 1) return SendClientMessage(playerid, WHITE, "cannot go below 1.");

new Float:X,Float:Y,Float:Z;

new location[MAX_ZONE_NAME];

GetPlayerPos(playerid,X,Y,Z);

CreateMoney(X, Y, Z, amount);

if(!IsPlayerInAnyVehicle(playerid))

{

SetPlayerPosEx(playerid, X, Y-2, Z);

}

SendClientMessage(playerid, GREY1,"* Money bag created.");

GetPlayerName(playerid, sendername, sizeof(sendername));

GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);

format(string, sizeof(string), "WARNING: %s has created a money bag worth $%d in %s (%0.2f, %0.2f, %0.2f).", sendername, amount, location, X, Y, Z);

            SendClientMessage(playerid, RED, string);

format(string, sizeof(string), "{FF6347}%s has hidden a money bag in %s worth $%d!", sendername, location, amount);

SendClientMessageToAll(LIGHTRED, string);

return 1;

    }

}[/pawn]

Ai incercat sa rezolvi singur ?: Normal doar nu sunt cretin, am incercat sa definesc, apoi sa il definesc chiar la linia 4203, dar am esuat... Daca stiti va rog ajutati-ma.

6 answers to this question

Recommended Posts

Posted

Nick: RealG.

Problema: Undefined problems

Erori / warnings:

D:\Randoms\Server de Samp\gamemodes\rpg.pwn(4203) : error 017: undefined symbol "tmp"
D:\Randoms\Server de Samp\gamemodes\rpg.pwn(4204) : error 017: undefined symbol "tmp"
D:\Randoms\Server de Samp\gamemodes\rpg.pwn(4204) : error 035: argument type mismatch (argument 2)
D:\Randoms\Server de Samp\gamemodes\rpg.pwn(4205) : error 017: undefined symbol "tmp"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Lini/script: [pawn] tmp = strtok(cmdtext, idx);

if(!strlen(tmp)) return SendClientMessage(playerid, "/makemoneybag [amount]");

new amount = strval(tmp);

if(amount < 1) return SendClientMessage(playerid, WHITE, "cannot go below 1.");[/pawn]

[pawn]    if(strcmp(cmd, "/makemoneybag", true) == 0 || strcmp(cmd, "/moneybag", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

        if(playerVariables[playerid][pAdminLevel] < 6)

        {

        return SendClientMessage(playerid, GREY, "    You are not authorized to use this command.");

}

tmp = strtok(cmdtext, idx);

if(!strlen(tmp)) return SendClientMessage(playerid, "/makemoneybag [amount]");

new amount = strval(tmp);

if(amount < 1) return SendClientMessage(playerid, WHITE, "cannot go below 1.");

new Float:X,Float:Y,Float:Z;

new location[MAX_ZONE_NAME];

GetPlayerPos(playerid,X,Y,Z);

CreateMoney(X, Y, Z, amount);

if(!IsPlayerInAnyVehicle(playerid))

{

SetPlayerPosEx(playerid, X, Y-2, Z);

}

SendClientMessage(playerid, GREY1,"* Money bag created.");

GetPlayerName(playerid, sendername, sizeof(sendername));

GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);

format(string, sizeof(string), "WARNING: %s has created a money bag worth $%d in %s (%0.2f, %0.2f, %0.2f).", sendername, amount, location, X, Y, Z);

            SendClientMessage(playerid, RED, string);

format(string, sizeof(string), "{FF6347}%s has hidden a money bag in %s worth $%d!", sendername, location, amount);

SendClientMessageToAll(LIGHTRED, string);

return 1;

    }

}[/pawn]

Ai incercat sa rezolvi singur ?: Normal doar nu sunt cretin, am incercat sa definesc, apoi sa il definesc chiar la linia 4203, dar am esuat... Daca stiti va rog ajutati-ma.

Ai papat o acoalada.

 

 

Posted

Unde mai exact? De ce nu imi arati si mie...

Nu ai mancat nici o acoloda. Unde ai pus aceasta comanda?

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Posted

Incearca

[pawn]if(strcmp(cmd, "/makemoneybag", true) == 0 || strcmp(cmd, "/moneybag", true) == 0)

    {

        if(IsPlayerConnected(playerid))

        {

            if(playerVariables[playerid][pAdminLevel] < 6)

            {

            return SendClientMessage(playerid, GREY, "    You are not authorized to use this command.");

            }

            tmp = strtok(cmdtext, idx);

            if(!strlen(tmp)) return SendClientMessage(playerid, -1, "/makemoneybag [amount]");

            new amount = strval(tmp);

            if(amount < 1) return SendClientMessage(playerid, WHITE, "cannot go below 1.");

            new Float:X,Float:Y,Float:Z;

            new location[MAX_ZONE_NAME];

            GetPlayerPos(playerid,X,Y,Z);

            CreateMoney(X, Y, Z, amount);

            if(!IsPlayerInAnyVehicle(playerid))

            {

                SetPlayerPosEx(playerid, X, Y-2, Z);

            }

            SendClientMessage(playerid, GREY1,"* Money bag created.");

            GetPlayerName(playerid, sendername, sizeof(sendername));

            GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);

            format(string, sizeof(string), "WARNING: %s has created a money bag worth $%d in %s (%0.2f, %0.2f, %0.2f).", sendername, amount, location, X, Y, Z);

            SendClientMessage(playerid, RED, string);

            format(string, sizeof(string), "{FF6347}%s has hidden a money bag in %s worth $%d!", sendername, location, amount);

            SendClientMessageToAll(LIGHTRED, string);

            return 1;

        }

    }[/pawn]

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.