I don't know how to fix this
#1

The Error.
Код:
C:\Users\owner\Desktop\V.I.P Command.pwn(29) : error 029: invalid expression, assumed zero
C:\Users\owner\Desktop\V.I.P Command.pwn(38) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
The Code.
Код:
#include <a_samp>
#include <zcmd>
#include <ladmin>

#define COLOR_RED 	0xFF0000FF
#define COLOR_GREEN 0x008000FF
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Server V.I.P Command's Loaded");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#endif

CMD:vipheal(playerid, params[])
{
	if(IsPlayerVipMember(playerid))
	SetPlayerHealth(playerid, 100);
	SendClientMessage(playerid, COLOR_GREEN, "Your Health Has Been Restored ^^");
	else SendClientMessage(playerid, COLOR_RED, "ERROR: You Are Not A Vip Member!"); // This Is Line 29
	return 1;
}

CMD:viparmour(playerid, params[])
{
	if(IsPlayerVipMember(playerid))
	SetPlayerArmour(playerid, 100);
	SendClientMessage(playerid, COLOR_GREEN, "Your Armour Has Been Restored ^^");
	else SendClientMessage(playerid, COLOR_RED, "ERROR: You Are Not A Vip Member!"); // This Is Line 38
	return 1;
}


Please, help me.
Reply
#2

you forgot to add the braces after the if condition:

pawn Код:
CMD:vipheal(playerid, params[])
{
    if(IsPlayerVipMember(playerid))
        { // <-----------
        SetPlayerHealth(playerid, 100);
        SendClientMessage(playerid, COLOR_GREEN, "Your Health Has Been Restored ^^");
        } // <-----------
    else SendClientMessage(playerid, COLOR_RED, "ERROR: You Are Not A Vip Member!"); // This Is Line 29
    return 1;
}

CMD:viparmour(playerid, params[])
{
    if(IsPlayerVipMember(playerid))
        { // <------------
        SetPlayerArmour(playerid, 100);
        SendClientMessage(playerid, COLOR_GREEN, "Your Armour Has Been Restored ^^");
        } // <------------
    else SendClientMessage(playerid, COLOR_RED, "ERROR: You Are Not A Vip Member!"); // This Is Line 38
    return 1;
}
Reply
#3

Thank's mate.
You safe my time .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)