help plz /givemoney cmd
#1

hi alll i make a script for cmd /givemoney and here it is

Код:
if (strcmp("/givemoney", cmdtext, true, 10) == 0||strcmp("/givemoney", cmdtext, true, 10) == 0)
{
    new
        Destination,
        Ammount,
        PlayerName[24],
        DestName[24],
        String[128];
	if(!cmdtext[50])return SendClientMessage(playerid, COLOR_LIGHTERBLUE, "Usage: /givemoney <playerid> <ammount>");
    if (GetPlayerMoney(playerid) < Ammount)
        return SendClientMessage(playerid, -1, "  Insufficent funds !");

    GetPlayerName(playerid, PlayerName, 24);
    GetPlayerName(Destination, DestName, 24);
    format(String, 128, "%s(%d) has sent you %d$", PlayerName, playerid, Ammount);
    SendClientMessage(Destination, -1, String);
    format(String, 128, "You've sent %d$ to %s(%d)", Ammount, DestName, Destination);
    SendClientMessage(playerid, -1, String);

    GivePlayerMoney(Destination, Ammount);
    GivePlayerMoney(playerid, -Ammount);
    return 1;
}
but i have those bugs

Код:
D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\test.pwn(21) : error 010: invalid function or declaration
D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\test.pwn(9) : error 010: invalid function or declaration
D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\test.pwn(10) : error 010: invalid function or declaration
D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\test.pwn(11) : error 010: invalid function or declaration
D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\test.pwn(13) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\test.pwn(13) : error 010: invalid function or declaration
D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\test.pwn(14) : warning 219: local variable "Destination" shadows a variable at a preceding level
D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\test.pwn(14) : error 025: function heading differs from prototype
D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\test.pwn(15) : warning 219: local variable "String" shadows a variable at a preceding level
D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\test.pwn(15) : error 010: invalid function or declaration
D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\test.pwn(16) : warning 219: local variable "Destination" shadows a variable at a preceding level
D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\test.pwn(16) : error 010: invalid function or declaration
D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\test.pwn(16) : error 010: invalid function or declaration
D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\test.pwn(16 -- 18) : error 025: function heading differs from prototype
D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\test.pwn(16 -- 18) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
plz help me and thank you

btw ( i want the cmd without sscanf ) thank to all your help
Reply


Messages In This Thread
help plz /givemoney cmd - by GGW - 21.08.2013, 13:46
Re: help plz /givemoney cmd - by Dragonsaurus - 21.08.2013, 14:11
Re: help plz /givemoney cmd - by GGW - 21.08.2013, 14:26
Re: help plz /givemoney cmd - by GGW - 21.08.2013, 14:45
Re: help plz /givemoney cmd - by Dragonsaurus - 21.08.2013, 15:02

Forum Jump:


Users browsing this thread: 1 Guest(s)