[SOLVED]4 invalid function or declaration
#1

Код:
C:\Users\Edy\Desktop\New Sa-Mp Server\gamemodes\Western.pwn(411) : error 010: invalid function or declaration
C:\Users\Edy\Desktop\New Sa-Mp Server\gamemodes\Western.pwn(413) : error 010: invalid function or declaration
C:\Users\Edy\Desktop\New Sa-Mp Server\gamemodes\Western.pwn(419) : error 010: invalid function or declaration
C:\Users\Edy\Desktop\New Sa-Mp Server\gamemodes\Western.pwn(423) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new Money = GetPlayerMoney(playerid);
if(dialogid == 1)
{
if(response)
{
if(listitem == 0)
{
if(Money > 49)
{
SendClientMessage(playerid, 0x21DD00FF, "You Bough A Desert Deagle");
GivePlayerWeapon(playerid,24,50);
GivePlayerMoney(playerid,-50);
}
}
}
}
}
if(listitem == 1)//Line 411
{
if(Money > 74)//Line 413
{
SendClientMessage(playerid, 0x21DD00FF, "You Bough A Country Rifle");
GivePlayerWeapon(playerid,33,30);
GivePlayerMoney(playerid,-75);
}
else//Line 419
{
SendClientMessage(playerid, 0x21DD00FF, "You Exited From Shop Menu");
}
return 1;//Line 423
}
Advise Thanks
Reply
#2

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new Money = GetPlayerMoney(playerid);
if(dialogid == 1)
{
if(response)
{
if(listitem == 0)
{
if(Money > 49)
{
SendClientMessage(playerid, 0x21DD00FF, "You Bough A Desert Deagle");
GivePlayerWeapon(playerid,24,50);
GivePlayerMoney(playerid,-50);
}
}
}
}

if(listitem == 1)//Line 411
{
if(Money > 74)//Line 413
{
SendClientMessage(playerid, 0x21DD00FF, "You Bough A Country Rifle");
GivePlayerWeapon(playerid,33,30);
GivePlayerMoney(playerid,-75);
}
else//Line 419
{
SendClientMessage(playerid, 0x21DD00FF, "You Exited From Shop Menu");
}
return 1;//Line 423
}
Remove the extra bracket

I think...
Reply
#3

Quote:
Originally Posted by ViruZZzZ_ChiLLL
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new Money = GetPlayerMoney(playerid);
if(dialogid == 1)
{
if(response)
{
if(listitem == 0)
{
if(Money > 49)
{
SendClientMessage(playerid, 0x21DD00FF, "You Bough A Desert Deagle");
GivePlayerWeapon(playerid,24,50);
GivePlayerMoney(playerid,-50);
}
}
}
}

if(listitem == 1)//Line 411
{
if(Money > 74)//Line 413
{
SendClientMessage(playerid, 0x21DD00FF, "You Bough A Country Rifle");
GivePlayerWeapon(playerid,33,30);
GivePlayerMoney(playerid,-75);
}
else//Line 419
{
SendClientMessage(playerid, 0x21DD00FF, "You Exited From Shop Menu");
}
return 1;//Line 423
}
Remove the extra bracket

I think...
If I remove It Gave Me More Errors
Reply
#4

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new Money = GetPlayerMoney(playerid);
    if(dialogid == 1)
    {
        if(response)
        {
            if(listitem == 0)
            {
                if(Money > 49)
                {
                    SendClientMessage(playerid, 0x21DD00FF, "You Bough A Desert Deagle");
                    GivePlayerWeapon(playerid,24,50);
                    GivePlayerMoney(playerid,-50);
                }
            }
            if(listitem == 1)
            {
                if(Money > 74)
                {
                    SendClientMessage(playerid, 0x21DD00FF, "You Bough A Country Rifle");
                    GivePlayerWeapon(playerid,33,30);
                    GivePlayerMoney(playerid,-75);
                }
            }  
        }
        else
        {
            SendClientMessage(playerid, 0x21DD00FF, "You Exited From Shop Menu");
        }
    }
    return 1;
}

... man you should learn pawn better...

you've closed the public and then scripted forward in the global script section....
which made this errors..
Reply
#5

Quote:
Originally Posted by gamer_Z
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new Money = GetPlayerMoney(playerid);
    if(dialogid == 1)
    {
        if(response)
        {
            if(listitem == 0)
            {
                if(Money > 49)
                {
                    SendClientMessage(playerid, 0x21DD00FF, "You Bough A Desert Deagle");
                    GivePlayerWeapon(playerid,24,50);
                    GivePlayerMoney(playerid,-50);
                }
            }
            if(listitem == 1)
            {
                if(Money > 74)
                {
                    SendClientMessage(playerid, 0x21DD00FF, "You Bough A Country Rifle");
                    GivePlayerWeapon(playerid,33,30);
                    GivePlayerMoney(playerid,-75);
                }
            }  
        }
        else
        {
            SendClientMessage(playerid, 0x21DD00FF, "You Exited From Shop Menu");
        }
    }
    return 1;
}

... man you should learn pawn better...

you've closed the public and then scripted forward in the global script section....
which made this errors..
Thanks i learned New Thing Today
Reply
#6

I'm happy to see you learned something
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)