Error !
#1

Hello,
im getting error in these lines :
Код:
if(dialogid == Commanddialog)
    {
       if(response) // If they clicked 'Select' or double-clicked a weapon
        {
            // Give them the weapon
            if(listitem == 0) // They selected the first item - Desert Eagle
            {
                ShowPlayerDialog(playerid, 6, DIALOG_STYLE_MSGBOX, "Common Commands", "/help - To Get More Help About Server\n/colors - To See List of Colors\n/Teles - To See all the Current Teles\n/admins - To see Online Admins\n/pm - To Send a Personal Message\n/afk - To Be AFK\n/back - To come Back From AFK", "Ok", "Cancel");
            }
            if(listitem == 1) // They selected the second item - AK-47
            {
                ShowPlayerDialog(playerid, 7, DIALOG_STYLE_MSGBOX, "Vip Commands", "/vheal - To Heal Yourself\n/vcar - To Spawn a VIP Car\n/vplane - To Spawn a VIP Plane\n/vcolor - To get VIP Color in Map ( Green )\n! - To Vip Chat", "Ok", "Cancel");
            }
            if(listitem == 2) // They selected the third item - Desert Eagle
            {
                ShowPlayerDialog(playerid, 8, DIALOG_STYLE_MSGBOX, "Admin Commands", "/", "Ok", "Cancel");
            }
            return 1;
    }
}
Error :
Код:
E:\Server\gamemodes\galaxy.pwn(403) : warning 217: loose indentation
E:\Server\gamemodes\galaxy.pwn(403) : error 029: invalid expression, assumed zero
E:\Server\gamemodes\galaxy.pwn(403) : error 004: function "OnPlayerClickPlayer" is not implemented
E:\Server\gamemodes\galaxy.pwn(407) : error 030: compound statement not closed at the end of file (started at line 314)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Help !
Reply
#2

Show us the EXACT lines the errors are on using this

pawn Код:
//Line blablabla
after each error line.

EDIT: Realized that as-well below post, should have looked over it thoroughly before posting.
Reply
#3

You were missing the second button parameter, and you omitted a bracket.
pawn Код:
if(dialogid == Commanddialog)
{
    if(response) // If they clicked 'Select' or double-clicked a weapon
    {
        // Give them the weapon
        if(listitem == 0) // They selected the first item - Desert Eagle
        {
            GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14); // Give them a desert eagle
        }
        if(listitem == 1) // They selected the second item - AK-47
        {
            ShowPlayerDialog(playerid, 6, DIALOG_STYLE_MSGBOX, "Vip Commands", "/vheal - To Heal Yourself\n/vcar - To Spawn a VIP Car\n/vplane - To Spawn a VIP Plane\n/vcolor - To get VIP Color in Map ( Green )\n! - To Vip Chat", "Ok", "Cancel");
        }
        if(listitem == 2) // They selected the third item - Desert Eagle
        {
            GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 28); // Give them a Combat Shotgun
        }
        return 1;
    }
}
Reply
#4

Question Updated !
Please solve it
Reply
#5

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
You were missing the second button parameter, and you omitted a bracket.
pawn Код:
if(dialogid == Commanddialog)
{
    if(response) // If they clicked 'Select' or double-clicked a weapon
    {
        // Give them the weapon
        if(listitem == 0) // They selected the first item - Desert Eagle
        {
            GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14); // Give them a desert eagle
        }
        if(listitem == 1) // They selected the second item - AK-47
        {
            ShowPlayerDialog(playerid, 6, DIALOG_STYLE_MSGBOX, "Vip Commands", "/vheal - To Heal Yourself\n/vcar - To Spawn a VIP Car\n/vplane - To Spawn a VIP Plane\n/vcolor - To get VIP Color in Map ( Green )\n! - To Vip Chat", "Ok", "Cancel");
        }
        if(listitem == 2) // They selected the third item - Desert Eagle
        {
            GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 28); // Give them a Combat Shotgun
        }
        return 1;
    }
}
Still Errors !
Reply
#6

Show us the ERRORS!

And show us what lines the errors are on!
Reply
#7

Error :
Код:
E:\Server\gamemodes\galaxy.pwn(417) : error 029: invalid expression, assumed zero
Line :
Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
Error :
Код:
E:\Server\gamemodes\galaxy.pwn(417) : error 004: function "OnPlayerClickPlayer" is not implemented
Line :
Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
Reply
#8

download native checker plugins , then run it
the error will show up on your console . .
Reply
#9

Solved Myself !
it just need return 0; in end
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)