Jump to content
  • 0

Gresit


mApY.

Question

Ce este gresit la acest public ?

[pawn]forward EsteScripter(playerid);

public EsteScripter(playerid)

{

if(IsPlayerConnected(playerid))

{

new nume[100];

        GetPlayerName(playerid, nume, sizeof(nume));

  if(strcmp(nume, "Adyi", true) == 0) || strcmp(nume, "Law", true) == 0) || (strcmp(nume, "Alex", true) == 0) || (strcmp(nume, "Stefan", true) == 0)

        {

    return 1;

}

}

return 0;

}[/pawn]

Eroare ..

C:\Users\BOGDAN\Desktop\Af edit by adyi [0.3x]\gamemodes\AF.pwn(4578) : error 029: invalid expression, assumed zero
C:\Users\BOGDAN\Desktop\Af edit by adyi [0.3x]\gamemodes\AF.pwn(4578) : warning 215: expression has no effect
C:\Users\BOGDAN\Desktop\Af edit by adyi [0.3x]\gamemodes\AF.pwn(4578) : error 001: expected token: ";", but found ")"
C:\Users\BOGDAN\Desktop\Af edit by adyi [0.3x]\gamemodes\AF.pwn(4578) : error 029: invalid expression, assumed zero
C:\Users\BOGDAN\Desktop\Af edit by adyi [0.3x]\gamemodes\AF.pwn(4578) : fatal error 107: too many error messages on one line

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


4 Errors.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

forward EsteScripter ( playerid ) ;

public EsteScripter ( playerid )

{

    if ( IsPlayerConnected ( playerid ) )

    {

        new

            nume [  100  ]

        ;

        GetPlayerName ( playerid , nume , sizeof ( nume ) ) ;

        if ( strcmp ( nume , "Adyi" ) == 0 ) || strcmp ( nume , "Law" ) == 0) || ( strcmp ( nume , "Alex" ) == 0 ) || ( strcmp ( nume , "Stefan" ) == 0 ) )

        {

            return ( true ) ;

        }

}

return ( false ) ;

}

Link to comment
Share on other sites

Am o "propunere" pentru tine :)) :

1.La variabila nume pune in loc de 100,MAX_PLAYER_NAME

ON:Cand deschizi o paranteza,trebuie sa o si inchizi:

[pawn]if(strcmp(nume, "Adyi", true) == 0) || strcmp(nume, "Law", true) == 0) || (strcmp(nume, "Alex", true) == 0) || (strcmp(nume, "Stefan", true) == 0)[/pawn]

-ai deschis o paranteza pentru if

-ai deschis o paranteza pentru strcmp-uri!

-Ai inchis o paranteza pentru strcmp-uri!

-Ai inchis o paranteza pentru if!

P.S:Ce este taiat,nu ai facut

Link to comment
Share on other sites

Am pus

[pawn]forward EsteScripter(playerid);

public EsteScripter(playerid)

{

if(IsPlayerConnected(playerid))

{

new nume[512];

        GetPlayerName(playerid, nume, sizeof(nume));

  if((strcmp(nume, "Adyi", true) == 0) || strcmp(nume, "Law", true) == 0) || (strcmp(nume, "Alex", true) == 0) || (strcmp(nume, "Stefan", true) == 0))

        {

    return 1;

}

}

return 0;

}[/pawn]

Si tot da erorile.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.