Jump to content

Question

Posted

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.

9 answers to this question

Recommended Posts

Posted

care e linia 4578

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

Posted

http://en.wikibooks.org/wiki/C++_Programming/Code/Standard_C_Library/Functions/strcmp

http://wiki.sa-mp.com/wiki/Strcmp

http://forum.sa-mp.com/showthread.php?t=199796

Citeste ce ti-am dat eu mai sus si te va ajuta daca nu mai lasa un reply aici Ok ?  :cheesy:

idiots.png
Posted

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 ) ;

}

Posted

Ai uitat o paranteza..

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

Posted

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

Posted

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.

Posted

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

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.