A little help, Please
#1

Код:
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(163) : error 004: function "ProxDetector" is not implemented
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(180) : error 017: undefined symbol "PlayerInfo"
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(180) : warning 215: expression has no effect
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(180) : error 001: expected token: ";", but found "]"
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(180) : error 029: invalid expression, assumed zero
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(180) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
pawn Код:
{
    if(strcmp(cmdtext, "/help", true) == 0)
    {
        SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
        SendClientMessage(playerid, COLOR_YELLOW2,"Account: /changepass /stats /skills");
        SendClientMessage(playerid, COLOR_YELLOW2,"General: /rules /request (/re)port /reportbug /helpme /buyclothes /buymisc /buyitem /buy");
        SendClientMessage(playerid, COLOR_YELLOW2,"General: /pay /give /time /buy /drink /licenses /showlicenses /animlist /buyhouse");
        SendClientMessage(playerid, COLOR_YELLOW2,"General: /lock /stopanin /(un)tie  /frisk /drop /id /flipcoin /picklock /(un)blindfold");
        SendClientMessage(playerid, COLOR_YELLOW2,"Chat: (/o)oc /b (/s)hout /local (/l)ow ");
        SendClientMessage(playerid, COLOR_YELLOW2,"Money: /cad (/companyad) (/ad)vertise /jobhelp");
        SendClientMessage(playerid, COLOR_YELLOW2,"Place: /buyhouse /setupbiz");
        SendClientMessage(playerid, COLOR_YELLOW2,"Other: /dshop /factiontypes (/ftypes) ");
        if (PlayerInfo[playerid][pAdmin] >= 1)
        {
        SendClientMessage(playerid, COLOR_YELLOW2, "Admin: (/ah)elp");
        }
        return 1;
    }
I don't understand what the error means.
Reply
#2

I don't see any problems in the provided code. Does it solve if you remove that part of code?
Reply
#3

The Problem seems to be in the
pawn Код:
if (PlayerInfo[playerid][pAdmin] >= 1)
part of the code
Reply
#4

No offence in any way what-so-ever. But are you by any chance ripping things off the Godfather or an edit?

Alright, make sure you have this line:

pawn Код:
PlayerInfo[MAX_PLAYERS][pInfo];
Place it under the closing bracket of your pInfo enumeration.
Reply
#5

No I aint "Ripping from a GodFather Edit" But I was using my expierience on what I learned on the "Tutorials" Section on the forums "Scripting Discussion".
Reply
#6

Now I have a problem here:

pawn Код:
public OnPlayerConnect(playerid)
{
    GetPlayerName(playerid, gPlayerName[playerid], MAX_PLAYER_NAME);
    if (fexist(getINI(playerid)))
    {
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COLOR_WHITE"Login",""COLOR_WHITE"Please Type your password below to login.","Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COLOR_WHITE"Register",""COLOR_WHITE"Please Type your password below to register a new account.","Register","Quit");
    }
    return 1;
}
Код:
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(127) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(127) : warning 215: expression has no effect
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(127) : error 001: expected token: ";", but found "-string-"
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(127) : warning 215: expression has no effect
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(127) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(127) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Quote:

This forum requires that you wait 120 seconds between posts. Please try again in 1 seconds. <- FUCK YOU

Reply
#7

pawn Код:
public OnPlayerConnect(playerid)
{
    GetPlayerName(playerid, gPlayerName[playerid], MAX_PLAYER_NAME);
    if (fexist(getINI(playerid)))
    {
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "{FFFFFF}Login", "Please Type your password below to login.","Login", "Quit");    
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{FFFFFF}Register", "Please Type your password below to register a new account.","Register", "Quit");    
    }
    return 1;
}
Reply
#8

Using my Tutorial

Anyways, just add this:

pawn Код:
#define WHITE "{FFFFFF}"
Reply
#9

Now Here

Код:
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(175) : error 004: function "ProxDetector" is not implemented
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(252) : error 017: undefined symbol "cmd"
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(256) : error 017: undefined symbol "gPlayerLogged"
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(256) : warning 215: expression has no effect
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(256) : error 001: expected token: ";", but found "]"
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(256) : error 029: invalid expression, assumed zero
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(256) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
pawn Код:
public OnPlayerText(playerid, text[]) // This callback is called when the players are chatting, we will change this from normal chat to our ProxDetector :)
{
    new pname[24], str[128]; // the new for the name and string the player will say
    GetPlayerName(playerid, pname, 24); // Gets the name so that it displays a name and not an ID
    format(str, sizeof(str), "%s Says: %s", pname, text); // The actual text, formatted into a string
    ProxDetector(10.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5); // Now this is where the fun begins. 10 means the radius, playerid is, well the playerid xD, str is your string and the colors are the colors you would like to have. You can change it!
    return 0; //IMPORTANT! always use return 0; otherwise it will display both normal chat AND the ProxDetector
}
pawn Код:
if(strcmp(cmd, "/me", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "   You havent logged in yet !");
                return 1;
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[96];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]");
                return 1;
            }
            if(PlayerInfo[playerid][pMask] == 1)
            {
                format(string, sizeof(string), "** Stranger %s **", result);
            }
            else
            {
                format(string, sizeof(string), "** %s %s **", sendername, result);
            }
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        }
        return 1;
    }
Reply
#10

Implement the function =\, it's not native you know...

pawn Код:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
pawn Код:
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
    if(IsPlayerConnected(playerid))
    {
        new Float:posx, Float:posy, Float:posz;
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        //radi = 2.0; //Trigger Radius
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
            {
                if(!BigEar[i])
                {
                    GetPlayerPos(i, posx, posy, posz);
                    tempposx = (oldposx -posx);
                    tempposy = (oldposy -posy);
                    tempposz = (oldposz -posz);
                    //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
                    if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
                    {
                        SendClientMessage(i, col1, string);
                    }
                    else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
                    {
                        SendClientMessage(i, col2, string);
                    }
                    else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
                    {
                        SendClientMessage(i, col3, string);
                    }
                    else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
                    {
                        SendClientMessage(i, col4, string);
                    }
                    else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
                    {
                        SendClientMessage(i, col5, string);
                    }
                }
                else
                {
                    SendClientMessage(i, col1, string);
                }
            }
        }
    }//not connected
    return 1;
}
As stripped from the Godfather.

EDIT: I'm not saying your ripping, but it does look like you are if you don't even know that ProxDetector needed to be implemented...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)