Little indent problem
#1

can you tell me where i am mistaking?
Error:
Quote:

D:\Games\ELRPv1\gamemodes\ELRP.pwn(215) : error 010: invalid function or declaration
D:\Games\ELRPv1\gamemodes\ELRP.pwn(21 : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

pawn Код:
public OnPlayerText(playerid, text[])

        {
        new pname[24], str[128];
        GetPlayerName(playerid, pname, 24);
        format(str, sizeof(str), "%s Says: %s", pname, text);
        ProxDetector(10.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
        return 0;
        }

        if PlayerInfo[playerid][pNMuted] == 1)
        {
        SendClientMessage(playerid,0xFF0000,"ERROR: You are muted!");
        return 0;
    }
Reply
#2

Um?! LMAO xD

pawn Код:
public OnPlayerText(playerid, text[])
{
    if PlayerInfo[playerid][pNMuted])
    {
        SendClientMessage(playerid,0xFF0000,"ERROR: You are muted!")
        return false;
    }

    new pname[24], str[128];
    GetPlayerName(playerid, pname, 24);
    format(str, sizeof(str), "%s Says: %s", pname, text);
    ProxDetector(10.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
    return false;
}
Reply
#3

Quote:

D:\Games\ELRPv1\gamemodes\ELRP.pwn(207) : error 001: expected token: "*then", but found ")"
D:\Games\ELRPv1\gamemodes\ELRP.pwn(207) : error 029: invalid expression, assumed zero
D:\Games\ELRPv1\gamemodes\ELRP.pwn(210) : error 001: expected token: ";", but found "return"
D:\Games\ELRPv1\gamemodes\ELRP.pwn(213) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

again
Reply
#4

pawn Код:
#include    "a_samp"

public OnPlayerText(playerid, text[])
{
    if PlayerInfo[playerid][pNMuted])
    {
        SendClientMessage(playerid,0xFF0000,"ERROR: You are muted!");
        return false;
    }

    new pname[24], str[128];
    GetPlayerName(playerid, pname, 24);
    format(str, sizeof(str), "%s Says: %s", pname, text);
    ProxDetector(10.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
    return false;
}
Reply
#5

fixed by my self by but thanks
pawn Код:
public OnPlayerText(playerid, text[])
{
    if (PlayerInfo[playerid][pNMuted] == 1)
    {
        SendClientMessage(playerid,0xFF0000,"ERROR: You are muted!");
        return 0;
    }

    new pname[24], str[128];
    GetPlayerName(playerid, pname, 24);
    format(str, sizeof(str), "%s Says: %s", pname, text);
    ProxDetector(10.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
    return 0;
}
Reply
#6

I just lost "(" and ";" in here:

pawn Код:
if(PlayerInfo[playerid][pNMuted])
    {
        SendClientMessage(playerid,0xFF0000,"ERROR: You are muted!");
You fixed it.. okey
Reply
#7

another thing i want to do this
pawn Код:
if(!IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pHelper] >= 2 ) return SendClientMessage(playerid, 0xFF4646FF, "You are not authorized to use that command !");
instead of this
pawn Код:
if(!IsPlayerAdmin(playerid)) return 1;
but its not working whats wrong with it?
Reply
#8

You wan't still to use IsPlayerAdmin(playerid), yes?

You won't player [pHelper] and [pAdmin] with level 2 or greater use this command. Change >= to <= if you wan't to let players with greater levels or 2 use this.

pawn Код:
if(!IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] < 2 || PlayerInfo[playerid][pHelper] < 2)
{
    SendClientMessage(playerid, 0xFF4646FF, "You are not authorized to use that command !");
    return true;
}
Reply
#9

its not working it is keep saying You are not authorized to use that command ... help
Reply
#10

/rcon login [password] so you can connect as admin , InPlayerAdmin = RCON admin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)