Jump to content
  • 0

Erori clan sistem


Jimmi

Question

Problema intalnita (descriere):Incerc sa fac un sistem de clan dar cand am facut dialogul care sa iti creeze clanul, ma rog numele si tag-ul imi da erori
Ero(area / rile) / warning-(ul / urile):

C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(11834) : error 035: argument type mismatch (argument 1)
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(11834) : error 035: argument type mismatch (argument 1)
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(11835) : error 028: invalid subscript (not an array or too many subscripts): "cNameclans"
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(11835) : warning 215: expression has no effect
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(11835) : error 001: expected token: ";", but found "]"
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(11835) : error 029: invalid expression, assumed zero
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(11835) : fatal error 107: too many error messages on one line

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


6 Errors.


Liniile de cod / sursa / script-ul(obligatoriu):

      format(cNameclans, sizeof(string), 20, "%s", inputtext);//error 035: argument type mismatch (argument 1)
            new verificaClan = MySQLCheckClan( cNameclans[playerid] );//error 028: invalid subscript (not an array or too many subscripts): "cNameclans"


Imagini / Video (optional):imageproxy.php?img=&key=f23daad6c0ba3c77http://i.imgur.com/6LFnGem.png[/img]
Ati incercat sa rezolvati singur?: Da

Tot codul:

Problema intalnita (descriere):Incerc sa fac un sistem de clan dar cand am facut dialogul care sa iti creeze clanul, ma rog numele si tag-ul imi da erori
Ero(area / rile) / warning-(ul / urile):

C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(11834) : error 035: argument type mismatch (argument 1)
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(11834) : error 035: argument type mismatch (argument 1)
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(11835) : error 028: invalid subscript (not an array or too many subscripts): "cNameclans"
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(11835) : warning 215: expression has no effect
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(11835) : error 001: expected token: ";", but found "]"
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(11835) : error 029: invalid expression, assumed zero
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(11835) : fatal error 107: too many error messages on one line

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


6 Errors.


Liniile de cod / sursa / script-ul(obligatoriu):

      format(cNameclans, sizeof(string), 20, "%s", inputtext);//error 035: argument type mismatch (argument 1)
            new verificaClan = MySQLCheckClan( cNameclans[playerid] );//error 028: invalid subscript (not an array or too many subscripts): "cNameclans"


Imagini / Video (optional):imageproxy.php?img=&key=f23daad6c0ba3c77http://i.imgur.com/6LFnGem.png[/img]
Ati incercat sa rezolvati singur?: Da

Tot codul:

if(dialogid == DIALOG_CREATE_CLAN)
    {
        if(!response) { return 1; }
        else
        {
            if(strlen(inputtext) > 20 || strlen(inputtext) < 3) return SCM(playerid, -1, "{008BC7}Informatie: {ffffff}Numele clanului nu poate fi mai scurt de 3 caractere sau mai lung de 20.");
              format(cNameclans, sizeof(string), 20, "%s", inputtext);
            new verificaClan = MySQLCheckClan( cNameclans[playerid] );
            if(verificaClan != 0) return SCM(playerid, -1, "{008BC7}Informatie: {ffffff}Un clan cu acest nume exista deja in baza de date.");
            format(string, sizeof(string), "{008BC7}Numele clanului a fost setat in %s.{ffffff}\nAcum, trebuie sa setezi si un tag ( minim 2 caractere, maxim 5 ).", cNameclans[playerid] );
            ShowPlayerDialog(playerid, DIALOG_CREATE_TAG + 1, DIALOG_STYLE_INPUT, "{008BC7}UNNIC Shop: {ffffff}Clan create:", string, "Next", "Close");
        }
    }
    if(dialogid == DIALOG_CREATE_TAG + 1)
    {
        if( !response ) { return 1; }
        new ID, cNameclans[50], cTag[50];
        if(strlen(inputtext) > 5 || strlen(inputtext) < 2) return SCM(playerid, -1, "{008BC7}Informatie: {ffffff}TAG-ul clanului nu poate fi mai scurt de 2 caractere sau mai lung de 5.");
        gszString[ 0 ] = EOS;
        new verificaClanTag = MySQLCheckTag( inputtext );
        if(verificaClanTag != 0) return SCM(playerid, -1, "{008BC7}Informatie: {ffffff}Un clan are deja acest TAG.");

        mysql_real_escape_string(inputtext, cTag);
        mysql_real_escape_string(cNameclans[playerid], CreateClanName);
        format( gszString, 150, "INSERT INTO `clans` (`NameClans`, `ClanTag`, `ClanSlots`, `ClanChatColor`) VALUES ('%s', '%s', 5, 1)", cNameclans, cTag);
        mysql_query( handle, gszString );
        clanID = cache_insert_id( handle );
        format( C_DATA[ ID ][ cName ], 30, CreateClanName[playerid] );
        format( C_DATA[ ID ][ cTag ], 30, inputtext );
        C_DATA[ ID ][ cSlots ] = 5;
        cRankN[ ID ][ 0 ] = "Membru";
        cRankN[ ID ][ 1 ] = "Membru";
        cRankN[ ID ][ 2 ] = "Membru";
        cRankN[ ID ][ 3 ] = "Membru";
        cRankN[ ID ][ 4 ] = "Membru";
        cRankN[ ID ][ 5 ] = "Co-Owner";
        cRankN[ ID ][ 6 ] = "Owner";
        C_DATA[ ID ][ cChatColor ] = 1;
        format( gszString, 128, "* {008BC7}Real-World Shop: {ffffff}Clanul %s [%d] a fost creat cu succes. Din cont ti-au fost retrase 100 PP.", C_DATA[ ID ][ cNameclans ], ID );
        SendClientMessage( playerid, -1, gszString );

        PlayerInfo[playerid][pPPoints] -= 25;
        Update(playerid, pPPointsu);
        
        TotalClansCreated ++
    }

 

Edited by Jimmi
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
format(cNameclans, sizeof(string), 20, "%s", inputtext);//error 035: argument type mismatch (argument 1)
            new verificaClan = MySQLCheckClan( cNameclans[playerid] );//error 028: invalid subscript (not an array or too many subscripts): "cNameclans"

aici, in loc de 'sizeof(string)' pui 'sizeof(cNameClans)';

 

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.