Pawno Problem
#1

Hello, Im trying to make a perfect Stevo's CNR GameMode Edit, But I get this errors when I press compile

pawn Code:
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2887) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2890) : error 017: undefined symbol "ShowLoginScreen"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2891) : error 029: invalid expression, assumed zero
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2891 -- 2892) : warning 215: expression has no effect
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2892) : error 001: expected token: ";", but found "if"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2892) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2892) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.
Reply
#2

B
U
M
P
:
)
Reply
#3

i think is this
Quote:

(2892) : error 001: expected token: ";", but found "if"

post this code
Reply
#4

Quote:
Originally Posted by Unknownich
View Post
i think is this
post this code
Just what I thought, Just have no idea how to solve it. Ive been trying for days, Thx for replying here you go

pawn Code:
if (!udb_Exists(PlayerName(playerid)))
Reply
#5

Post your pawno code ill try to correct it for you. then explain what I did so this is beneficial for you.


EDIT -

If its saying that "if (!udb_Exists(PlayerName(playerid)))" is the problem then try this
"; (!udb_Exists(PlayerName(playerid)))" thats what its saying is wrong is that it expected to see ; but got if try it
Reply
#6

Quote:
Originally Posted by arathin
View Post
Post your pawno code ill try to correct it for you. then explain what I did so this is beneficial for you.


EDIT -

If its saying that "if (!udb_Exists(PlayerName(playerid)))" is the problem then try this
"; (!udb_Exists(PlayerName(playerid)))" thats what its saying is wrong is that it expected to see ; but got if try it
pawn Code:
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2887) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2890) : error 017: undefined symbol "ShowLoginScreen"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2891) : error 029: invalid expression, assumed zero
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2891 -- 2892) : warning 215: expression has no effect
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2892) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2894) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2895) : error 017: undefined symbol "ShowRegisterScreen"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2928) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2929) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2930) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2931) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2932) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2933) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2934) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2935) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2936) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2937) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2938) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2939) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2940) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2941) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2942) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2943) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2947) : error 004: function "ResetVariables" is not implemented
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2956) : error 004: function "RemoveRoadblock" is not implemented
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(2979) : error 017: undefined symbol "PlayerName"
C:\Users\Gandhi\Desktop\CnR\gamemodes\SFCRRPG.pwn(3009) : error 017: undefined symbol "PlayerObjectUpdate"

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.
Reply
#7

Post your code for lines 2887-3010.
Reply
#8

pawn Code:
if (!udb_Exists(PlayerName(playerid)))
    {
        SendClientMessage(playerid,COLOR_ERROR,"This player name has already been registered. Please login before you spawn.");
        ShowLoginScreen(playerid);
        else
        if(!udb_Exists(PlayerName(playerid)))

        SendClientMessage(playerid,COLOR_ERROR,"This player name has not been registered. You must register before playing on BCCAR.");
        ShowRegisterScreen(playerid);
    }
    for(new i = 0; i < sizeof(Objects); i++) Player[playerid][view][i] = false; /////////xobj
   
    return 1;
}
//==============================================================================

public OnPlayerDisconnect(playerid, reason)
{
    if(IsPlayerNPC(playerid))
    {
        IsSpawned[playerid] =0;
        return 1;
    }
    if(afktag[playerid] == 1)
    {
        new pname[16];
        GetPlayerName(playerid,pname,16);
        strdel(pname, strlen(pname)-5, strlen(pname));
        afktag[playerid] =0;
        SetPlayerName(playerid,pname);
    }
    new string[128];
    new pname[24];
    GetPlayerName(playerid,pname,sizeof(pname));
   
    //Save Wanted Level && Jailtime
    SavedWantedLevel[playerid] =GetPlayerWantedLevel(playerid);
    SavedJailTime[playerid] =JailTime[playerid];
   
    if(PLAYERLIST_authed[playerid] == 1)
    {
        dUserSetINT(PlayerName(playerid)).("Bankcash",BankCash[playerid]);
        dUserSetINT(PlayerName(playerid)).("Cash",GetPlayerMoney(playerid));
        dUserSetINT(PlayerName(playerid)).("Score",GetPlayerScore(playerid));
        dUserSetINT(PlayerName(playerid)).("Adminlevel",AdminLevel[playerid]);
        dUserSetINT(PlayerName(playerid)).("Army",CanUseArmy[playerid]);
        dUserSetINT(PlayerName(playerid)).("NCIS",CanUseNCIS[playerid]);
        dUserSetINT(PlayerName(playerid)).("RegularPlayer",IsRegularPlayer[playerid]);
        dUserSetINT(PlayerName(playerid)).("DrugHouseOwner",DrugHouseOwner[playerid]);
        dUserSetINT(PlayerName(playerid)).("OttoOwner",OttoOwner[playerid]);
        dUserSetINT(PlayerName(playerid)).("TSkill",TerroristSkill[playerid]);
        dUserSetINT(PlayerName(playerid)).("RobSkill",RobSkill[playerid]);
        dUserSetINT(PlayerName(playerid)).("HasPackC4",HasPackC4[playerid]);
        dUserSetINT(PlayerName(playerid)).("HasPackRope",HasPackRope[playerid]);
        dUserSetINT(PlayerName(playerid)).("HasPackMoney",HasPackMoney[playerid]);
        dUserSetINT(PlayerName(playerid)).("SavedWantedLevel",SavedWantedLevel[playerid]);
        dUserSetINT(PlayerName(playerid)).("SavedJailTime",SavedJailTime[playerid]);
    }
   
    //Do things to the playerid
    ResetVariables(playerid);
    TextDrawHideForPlayer(playerid,VersionTD);
    TextDrawHideForPlayer(playerid,WebsiteTD);
    TextDrawDestroy(MessageTD[playerid]);
    TextDrawDestroy(JailTimer[playerid]);
    TextDrawDestroy(LocationTD[playerid]);
   
    if (PlayerInfo[playerid][pRoadblock] != 0)
    {
        RemoveRoadblock(playerid);
    }
    for(new i = 0; i < sizeof(Objects); i++) ////Xobj
    {
        if(Player[playerid][view][i])
        {
            Player[playerid][view][i] = false;
            DestroyPlayerObject(playerid,Player[playerid][objid][i]);
        }
    }
    format(string,sizeof(string),"%s Has just left the server! (%s)",pname,aDisconnectNames[reason]);
    SendClientMessageToAll(COLOR_VIOLETBLUE,string);
    format(string,sizeof(string),"1%s Has just left the server! (%s)",pname,aDisconnectNames[reason]);
    IRC_Say(gGroupID,IRC_CHANNEL,string);
    return 1;
}

//==============================================================================

public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid))
    {
        if(strcmp(PlayerName(playerid), "Billy") == 0)
        {
            PutPlayerInVehicle(playerid,NPCTram,0);
            SetPlayerColor(playerid,COLOR_DARKOLIVEGREEN);
            SetPlayerSkin(playerid,255);
            IsSpawned[playerid] =1;
            print("[NPC SPAWN] Billy has been placed in his tram.");
        }
        return 1;
    }
    new string[128];
    new pname[128];

    GetPlayerName(playerid,pname,sizeof(pname));
    //Namebanned
    if(NameBanned[playerid] == 1)
    {
        format(string,sizeof(string),"[AUTO BAN] %s(%d) has been auto banned for ban evading. (Nickname is banned).",pname,playerid);
        SendClientMessageToAll(COLOR_ADMIN,string);
       
        format(string,sizeof(string),"9[AUTO BAN] %s(%d) has been auto banned for ban evading. (Nickname is banned).",pname,playerid);
        IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
        Banning[playerid] =1;
        SetTimer("BanPlayer",700,0);
        return 1;
    }
   
    SetPlayerWantedLevel(playerid,0);
    SetPlayerToTeamColour(playerid);
    //////xobject
    PlayerObjectUpdate(playerid);
    TextDrawShowForPlayer(playerid,LocationTD[playerid]);
Reply
#9

h
e
l
p
? xd
Reply
#10

R
e
a
d

t
h
e

r
u
l
e
s, and stop bumping every hour.
Reply
#11

Quote:
Originally Posted by Schurman
View Post
R
e
a
d

t
h
e

r
u
l
e
s, and stop bumping every hour.
On topic please
Reply
#12

Please answer, This is asap
Reply
#13

Okay ive been trying to fix this pawn file for a while now my advice is to find another cnr gamemode n just edit it to your liking this time dont script your login/register just use a filterscript called xtremeadmin as it has commands for admins and a login script
Reply
#14

Quote:
Originally Posted by arathin
View Post
Okay ive been trying to fix this pawn file for a while now my advice is to find another login script :/ I would recommend getting the filterscript xtremeadmin it has a register/login script in it and its easy to use.
I have lux admin
Reply
#15

Quote:
Originally Posted by Vasu99
View Post
I have lux admin
Ahh I see. Well then did you code this gamemode or just take a premade CnR and edit it a bit?
Reply
#16

Quote:
Originally Posted by arathin
View Post
Ahh I see. Well then did you code this gamemode or just take a premade CnR and edit it a bit?
I took a premade one, But I have worked on it very hard so I guess its like 50-50% mine xD
Reply
#17

Oh okay lol
Reply
#18

Quote:
Originally Posted by arathin
View Post
Oh okay lol
still no answer L:
Reply
#19

Did the errors occur before or after you put the login script in?
Reply
#20

Quote:
Originally Posted by arathin
View Post
Did the errors occur before or after you put the login script in?
Well, Ive had the lux admin system for a very long time, And this error just started..
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)