HELP ME PLZ!!!
#1

hi i get error in these lines


PHP код:
ShowPlayerDialog(playerid67DIALOG_STYLE_LIST"Weapon shop""Chainsaw\nDesert Eagle\nSawnoff Shotgun/nMicro SMG\nMP5\nSniper Rifle\nShotgun/n9mm""Buy""Cancel");
    return 
1;
    } 
error 017: undefined symbol "playerid"

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
    {    
// error
    
if(dialogid == 67)
    {
    if(!
response)
    return 
1;
    switch(
listitem)

error 021: symbol already defined: "S@@_OnDialogResponse"


Full Code:
PHP код:
CMD:weapons(playersparams[])
{
    
ShowPlayerDialog(playerid67DIALOG_STYLE_LIST"Weapon shop""Chainsaw\nDesert Eagle\nSawnoff Shotgun/nMicro SMG\nMP5\nSniper Rifle\nShotgun/n9mm""Buy""Cancel");
    return 
1;
    }
    public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
    {
    if(
dialogid == 67)
    {
    if(!
response)
    return 
1;
    switch(
listitem)
{
    case 
0:
    {
    
GivePlayerWeapon(playerid91);
    
SendClientMessage(playerid0x0000FFAA"You have recieved the weapon.");
    }
    case 
1:
    {
    
GivePlayerWeapon(playerid249999);
    
SendClientMessage(playerid0x33FF00AA"You Have Recieved Your Weapon.");
    }
    case 
2:
    {
    
GivePlayerWeapon(playerid269999);
    
SendClientMessage(playerid0x00FFFFAA"You Have Recieved Your Weapon.");
    }
    case 
3:
    {
    
GivePlayerWeapon(playerid289999);
    
SendClientMessage(playerid0x6600FFAA"You Have Recieved Your Weapon.");
    }
    case 
4:
    {
    
GivePlayerWeapon(playerid299999);
    
SendClientMessage(playerid0x99FF00AA"You Have Recieved Your Weapon.");
    }
    case 
5:
    {
    
GivePlayerWeapon(playerid269000);
    
SendClientMessage(playerid0x999999AA"You Have Recieved Your Weapon.");
    }
    case 
6:
    {
    
GivePlayerWeapon(playerid349000);
    
SendClientMessage(playerid0xCC0000AA"You Have Recieved Your Weapon.");
    }
    case 
7:
    {
    
GivePlayerWeapon(playerid259999);
    
SendClientMessage(playerid0xFF00FFAA"You Have Recieved Your Weapon.");
    }
    case 
8:
    {
    
GivePlayerWeapon(playerid229999);
    
SendClientMessage(playerid0xCCFF00AA"You Have Recieved Your Weapon.");
    }
    }
    }
    return 
1;
    } 
Reply
#2

Quote:

CMD:weapons(players, params[])

To:
Quote:

CMD:weapons(playerid, params[])

that should fix it
Reply
#3

Don't put publics inside commands.


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
Reply
#4

Quote:
Originally Posted by ikey07
Посмотреть сообщение
Don't put publics inside commands.


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
i tried the code just as it is there. and i got no errors but the same error he got "playerid"
But its true..
Reply
#5

bump
Reply
#6

PHP код:
CMD:weapons(playeridparams[]) //it was playerid not players
{
    
ShowPlayerDialog(playerid67DIALOG_STYLE_LIST"Weapon shop""Chainsaw\nDesert Eagle\nSawnoff Shotgun/nMicro SMG\nMP5\nSniper Rifle\nShotgun/n9mm""Buy""Cancel");
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 67)
    {
        if(!
response) return 1;
        switch(
listitem)
        {
            case 
0:
            {
                
GivePlayerWeapon(playerid91);
                
SendClientMessage(playerid0x0000FFAA"You have recieved the weapon.");
            }
            case 
1:
            {
                
GivePlayerWeapon(playerid249999);
                
SendClientMessage(playerid0x33FF00AA"You Have Recieved Your Weapon.");
            }
            case 
2:
            {
                
GivePlayerWeapon(playerid269999);
                
SendClientMessage(playerid0x00FFFFAA"You Have Recieved Your Weapon.");
            }
            case 
3:
            {
                
GivePlayerWeapon(playerid289999);
                
SendClientMessage(playerid0x6600FFAA"You Have Recieved Your Weapon.");
            }
            case 
4:
            {
                
GivePlayerWeapon(playerid299999);
                
SendClientMessage(playerid0x99FF00AA"You Have Recieved Your Weapon.");
            }
            case 
5:
            {
                
GivePlayerWeapon(playerid269000);
                
SendClientMessage(playerid0x999999AA"You Have Recieved Your Weapon.");
            }
            case 
6:
            {
                
GivePlayerWeapon(playerid349000);
                
SendClientMessage(playerid0xCC0000AA"You Have Recieved Your Weapon.");
            }
            case 
7:
            {
                
GivePlayerWeapon(playerid259999);
                
SendClientMessage(playerid0xFF00FFAA"You Have Recieved Your Weapon.");
            }
            case 
8:
            {
                
GivePlayerWeapon(playerid229999);
                
SendClientMessage(playerid0xCCFF00AA"You Have Recieved Your Weapon.");
            }
        }
    }
    return 
1;

Reply
#7

Quote:
Originally Posted by ahameed4755
Посмотреть сообщение
bump
Are u stupid,uk what? Nvrm...
Reply
#8

@ReshiramZekrom Didn't Worked.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)