SA-MP Forums Archive
Error ! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Error ! (/showthread.php?tid=361750)



Error ! - Avi57 - 22.07.2012

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 !


Re: Error ! - Kindred - 22.07.2012

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.


Re: Error ! - ReneG - 22.07.2012

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;
    }
}



Re: Error ! - Avi57 - 22.07.2012

Question Updated !
Please solve it


Re: Error ! - Avi57 - 22.07.2012

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 !


Re: Error ! - Kindred - 22.07.2012

Show us the ERRORS!

And show us what lines the errors are on!


Re: Error ! - Avi57 - 22.07.2012

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)



Re: Error ! - Devilxz97 - 22.07.2012

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


Re: Error ! - Avi57 - 22.07.2012

Solved Myself !
it just need return 0; in end