Jump to content

Question

Posted

Problema intalnita (descriere): Am adaugat cmd lideri din tutorialul acesta: 
Ero(area / rile) / warning-(ul / urile):C:UsersJorjDesktopsaints v1.3gamemodessaints.pwn(2726) : error 035: argument type mismatch (argument 1)

C:UsersJorjDesktopsaints v1.3gamemodessaints.pwn(12491) : warning 217: loose indentation
C:UsersJorjDesktopsaints v1.3gamemodessaints.pwn(12485) : warning 204: symbol is assigned a value that is never used: "string3"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
 
 
1 Error.
 

Liniile de cod / sursa / script-ul(obligatoriu):Sunt puse in tutorial
Imagini / Video (optional):
Ati incercat sa rezolvati singur?:Am incercat dar nam reusit

12 answers to this question

Recommended Posts

  • 0
Posted

Am pus cum e tutorial stock si imi da urm eroare

C:UsersJorjDesktopsaints v1.3gamemodessaints.pwn(2726) : warning 217: loose indentation
C:UsersJorjDesktopsaints v1.3gamemodessaints.pwn(2726) : error 017: undefined symbol "ReturnUserEx"
C:UsersJorjDesktopsaints v1.3gamemodessaints.pwn(2731) : warning 217: loose indentation
C:UsersJorjDesktopsaints v1.3gamemodessaints.pwn(12491) : warning 217: loose indentation
C:UsersJorjDesktopsaints v1.3gamemodessaints.pwn(12485) : warning 204: symbol is assigned a value that is never used: "string3"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

  • 0
  • 0
Posted (edited)

pai fuctiile respective sunt din saints  si pe acest gm leam adaugat

Edited by GenOxigen
  • 0
  • 0
Posted (edited)

if(IsPlayerConnected( szName ) )

, incearca asa.

Incearca asa

if( IsPlayerConnected( ReturnUserEx( szName ) ) )

Am pus cum e tutorial stock si imi da urm eroare

C:UsersJorjDesktopsaints v1.3gamemodessaints.pwn(2726) : warning 217: loose indentation

C:UsersJorjDesktopsaints v1.3gamemodessaints.pwn(2726) : error 017: undefined symbol "ReturnUserEx"

C:UsersJorjDesktopsaints v1.3gamemodessaints.pwn(2731) : warning 217: loose indentation

C:UsersJorjDesktopsaints v1.3gamemodessaints.pwn(12491) : warning 217: loose indentation

C:UsersJorjDesktopsaints v1.3gamemodessaints.pwn(12485) : warning 204: symbol is assigned a value that is never used: "string3"

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

1 Error.

 

Adaugi asta la sfarsitul GM

ReturnUserEx(text[], playerid = INVALID_PLAYER_ID)
{
    new pos = 0;
    while (text[pos] < 0x21)
    {
        if (text[pos] == 0) return INVALID_PLAYER_ID;
        pos++;
    }
    new userid = INVALID_PLAYER_ID;
    if (IsNumeric(text[pos]))
    {
        
        userid = strval(text[pos]);
        if (userid >=0 && userid < MAX_PLAYERS)
        {
            if(!IsPlayerConnected(userid))
            {
                userid = INVALID_PLAYER_ID;
            }
            else
            {
                return userid;
            }
        }
    }
    new len = strlen(text[pos]);
    new count = 0;
    new name[MAX_PLAYER_NAME];
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
        if (IsPlayerConnected(i))
        {
            if (strcmp(GetName( i ), text[pos], true, len) == 0)
            {
                if (len == strlen(name))
                {
                    return i;
                }
                else
                {
                    count++;
                    userid = i;
                }
            }
        }
    }
    if (count != 1)
    {
        if (playerid != INVALID_PLAYER_ID)
        {
            if (count)
            {
                SendClientMessage(playerid, 0xFF0000AA, "Multiple users found, please narrow earch");
            }
            else
            {
                SendClientMessage(playerid, 0xFF0000AA, "No matching user found");
            }
        }
        userid = INVALID_PLAYER_ID;
    }
    return userid;
} 

si asta la fel tot la sfarsit :

IsNumeric(const string[])
{
        for (new i = 0, j = strlen(string); i < j; i++)
        {
                if (string > '9' || string < '0') return 0;
        }
        return 1;
}

 

Edited by Mafia.
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.