error 001: expected token: "-identifier-", but found "-integer value-"
#1

pawn Код:
public OnPlayerConnect(playerid)
{
    {
        new DIALOG_RULES; // error line
        new BigString[1900];
        strcat(BigString, "\n{FFFFFF}1.  Respect and obey all Admins.", 1900 );
        strcat(BigString, "\n{FFFFFF}2.  Do not Deathmatch or Teamkill.", 1900 );
        strcat(BigString, "\n{FFFFFF}3.  Do not Spam.", 1900 );
        strcat(BigString, "\n{FFFFFF}4.  Do not use cheats or hacks.", 1900 );
        strcat(BigString, "\n{FFFFFF}5.  Respect all other players.", 1900 );
        strcat(BigString, "\n{FFFFFF}6.  Cops and Robbers should never team up.", 1900 );
        strcat(BigString, "\n{FFFFFF}7.  Never quit to avoid anything.", 1900 );
        strcat(BigString, "\n{FFFFFF}8.  Medics should never harm other players.", 1900 );
        strcat(BigString, "\n{FFFFFF}9.  Never abuse a bug.", 1900 );
        strcat(BigString, "\n{FFFFFF}10. No mods are allowed.", 1900 );
        ShowPlayerDialog(playerid,1, DIALOG_STYLE_MSGBOX, "{ff0000}Main Server Rules:", BigString, "Accept","Ignore");
       
        GetPlayerName(playerid, pname, sizeof(pname));
        format(string, sizeof(string), "%s has Joined the server.", pname);
        SendClientMessageToAll(COLOR_CYAN, string);
        return 1;
     }
}
and
pawn Код:
public time() // Line 335{Warning}
and
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new string[128];
    SpamStrings[playerid] +=2;
    if(SpamStrings[playerid] >= MAX_SPAM)
    {
        format(string,sizeof(string),"Please do not spam in %s. Please wait before typing again.");
        SendClientMessage(playerid, COLOR_ERROR, string);
        return 1;
    }
    //Civilian Commands.
    dcmd(rules,5,cmdtext); //2 Warnings..
    return 1;
}
Код:
D:\SAMP\Server\SACCNR [0.3e R2]\gamemodes\SACCNR.pwn(71) : error 001: expected token: "-identifier-", but found "-integer value-"
D:\SAMP\Server\SACCNR [0.3e R2]\gamemodes\SACCNR.pwn(335) : warning 235: public function lacks forward declaration (symbol "time")
D:\SAMP\Server\SACCNR [0.3e R2]\gamemodes\SACCNR.pwn(680) : warning 202: number of arguments does not match definition
D:\SAMP\Server\SACCNR [0.3e R2]\gamemodes\SACCNR.pwn(680) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
I'd like to remove the warnings and the error, help?
Reply
#2

Anyone?
Reply
#3

First of all, dialog names are being defined like that:
pawn Код:
#define DIALOG_RULES 1
Second, why do you need to open a second bracket here?
pawn Код:
public OnPlayerConnect(playerid)
{
    {
Third, you need to forward the function "time()" by adding
pawn Код:
forward time();
Somewhere at the beginning of your script.
Reply
#4

pawn Код:
public OnPlayerConnect(playerid)
{
        new DIALOG_RULES; // error line
        new BigString[1900];
        strcat(BigString, "\n{FFFFFF}1.  Respect and obey all Admins.", 1900 );
        strcat(BigString, "\n{FFFFFF}2.  Do not Deathmatch or Teamkill.", 1900 );
        strcat(BigString, "\n{FFFFFF}3.  Do not Spam.", 1900 );
        strcat(BigString, "\n{FFFFFF}4.  Do not use cheats or hacks.", 1900 );
        strcat(BigString, "\n{FFFFFF}5.  Respect all other players.", 1900 );
        strcat(BigString, "\n{FFFFFF}6.  Cops and Robbers should never team up.", 1900 );
        strcat(BigString, "\n{FFFFFF}7.  Never quit to avoid anything.", 1900 );
        strcat(BigString, "\n{FFFFFF}8.  Medics should never harm other players.", 1900 );
        strcat(BigString, "\n{FFFFFF}9.  Never abuse a bug.", 1900 );
        strcat(BigString, "\n{FFFFFF}10. No mods are allowed.", 1900 );
        ShowPlayerDialog(playerid,1, DIALOG_STYLE_MSGBOX, "{ff0000}Main Server Rules:", BigString, "Accept","Ignore");
       
        GetPlayerName(playerid, pname, sizeof(pname));
        format(string, sizeof(string), "%s has Joined the server.", pname);
        SendClientMessageToAll(COLOR_CYAN, string);
        return 1;
  }

forward time();
public time()
{
}
Reply
#5

First, I already defined it, still same error.. About eh
pawn Код:
new DIALOG_RULES;
It's already defined..
removing the bracket didn't help..

About the time () Warning fixed.

What about the last 2 warning about the dcmd(rules,5,cmdtext) ??
Reply
#6

Anyone help?
Reply
#7

Quote:
Originally Posted by _Khaled_
Посмотреть сообщение
Anyone help?
Can you re-post with your current issues/errors?

-

Very sleepy at this time.
Reply
#8

Well, have you got
pawn Код:
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
In your script?
Reply
#9

Stop double posting and bumping ant try and fix it instead of being spoon fed
Reply
#10

Quote:
Originally Posted by [MWR]Blood
Посмотреть сообщение
Well, have you got
pawn Код:
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
In your script?
Код:
forward time();
public time()
{
}
^ - Mentioned by another member on this thread.

Do you have these placed inside the code/script/gm?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)