I'm getting error while compiling (Noob)
#2

Here's the code indented:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/vipgo", cmdtext, true, 7) == 0)
    {
        MoveObject(gate1,-2429.74829, 697.10651, 27.89320, 1);
        SendClientMessage(playerid, 0xEF994300, "The gate has opened, Welcome.");
    }
    return 1;
}
if (strcmp("/vipgc", cmdtext, true, 7) == 0)
{
    MoveObject(gate1,-2429.74829, 697.10651, 34.18119,1);
    SendClientMessage(playerid, 0xEF994300, "The gate has closed.");
}
return 1;
}
return 0;
}
You have the "vipgc" command outside of the function.
It should be like this:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/vipgo", cmdtext, true, 7) == 0)
    {
        MoveObject(gate1,-2429.74829, 697.10651, 27.89320, 1);
        SendClientMessage(playerid, 0xEF994300, "The gate has opened, Welcome.");
	return 1;
    }
    if (strcmp("/vipgc", cmdtext, true, 7) == 0)
    {
        MoveObject(gate1,-2429.74829, 697.10651, 34.18119,1);
        SendClientMessage(playerid, 0xEF994300, "The gate has closed.");
        return 1;
    }
    return 0;
}
And you should start using zcmd.
It's much faster than what you're doing, and it's a lot easier to code with.
Reply


Messages In This Thread
I'm getting error while compiling (Noob) - by DwayneMichael - 11.06.2016, 14:08
Re: I'm getting error while compiling (Noob) - by Stinged - 11.06.2016, 14:26
Re: I'm getting error while compiling (Noob) - by DwayneMichael - 11.06.2016, 16:07

Forum Jump:


Users browsing this thread: 1 Guest(s)