error 029: invalid expression, assumed zero
#1

What is wrong with this? I keep getting 1 error

Код:
C:\Users\tyrese143\Desktop\NEW SERVER INSTALLATION\Cadmin1.pwn(598) : error 029: invalid expression, assumed zero

pawn Код:
if(!udb_Exists(PlayerName2(playerid)))
        format(rstring,256,"Welcome to the '%s'\n\nAccount '%s' is not registred!\n\nEnter the password to Register your Account:",GetServerHostName(),pName(playerid));
        ShowPlayerDialog(playerid,DIALOGID+66,DIALOG_STYLE_INPUT,"Register Account",rstring,"Register","Quit");

    else//line 599
    {
            AccInfo[playerid][Registered] = 1;
    format(file,sizeof(file),"/LuxAdmin/Accounts/%s.sav",udb_encode(PlayerName));
    new tmp2[256]; tmp2 = dini_Get(file,"Ip");

    if( (!strcmp(tmp3,tmp2,true)) && (ServerInfo[AutoLogin] == 1))
    {
        LoginPlayer(playerid);
        if(AccInfo[playerid][Level] > 0)
        {
            switch(AccInfo[playerid][Level])
            {
                case 1: AdmRank = "Basic Moderator";
                case 2: AdmRank = "Moderator";
                case 3: AdmRank = "Master Moderator";
                case 4: AdmRank = "Administrator";
                case 5: AdmRank = "Master Administrator";
            }
            if(AccInfo[playerid][Level] > 5)
            {
                AdmRank = "Professional Admin";
            }
Reply
#2

you need to use brackets for the if statement if its more than one line

pawn Код:
if() {} else {}
Reply
#3

Can you do it please?
Reply
#4

use this
pawn Код:
if(!udb_Exists(PlayerName2(playerid)))
    SendClientMessage(playerid,orange, "SERVER: Your account isn't registered. Please register (/"#RegisterCommand")");
    else
    {
    AccInfo[playerid][Registered] = 1;
    format(file,sizeof(file),"/LuxAdmin/Accounts/%s.sav",udb_encode(PlayerName));
    new tmp2[256]; tmp2 = dini_Get(file,"Ip");

    if( (!strcmp(tmp3,tmp2,true)) && (ServerInfo[AutoLogin] == 1))
    {
        LoginPlayer(playerid);
        if(AccInfo[playerid][Level] > 0)
        {
            switch(AccInfo[playerid][Level])
            {
                case 1: AdmRank = "Basic Moderator";
                case 2: AdmRank = "Moderator";
                case 3: AdmRank = "Master Moderator";
                case 4: AdmRank = "Administrator";
                case 5: AdmRank = "Master Administrator";
            }
            if(AccInfo[playerid][Level] > 5)
            {
                AdmRank = "Professional Admin";
            }
Reply
#5

pawn Код:
if(!udb_Exists(PlayerName2(playerid)))
{
    format(rstring,256,"Welcome to the '%s'\n\nAccount '%s' is not registred!\n\nEnter the password to Register your Account:",GetServerHostName(),pName(playerid));
    ShowPlayerDialog(playerid,DIALOGID+66,DIALOG_STYLE_INPUT,"Register Account",rstring,"Register","Quit");
}
else//line 599
Reply
#6

Look at the script it shows you the error line..
Reply
#7

Nero, Now im getting this

pawn Код:
C:\Users\tyrese143\Desktop\NEW SERVER INSTALLATION\Cadmin1.pwn(668) : warning 209: function "OnPlayerConnect" should return a value
Reply
#8

type
pawn Код:
return 1;
at last of onplayerconnect
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)