Jump to content

Question

Posted

Deci cu ajutorul unui tutorial de la gta-mp am incercat sa pun un /buyvip in scriptul LuxAdmin l-am adaugat unde sunt si celalalte comenzi si arata cam asa:[pawn] dcmd_buyvip(playerid,params[]) //Adaugati oriunde in GameMode :P

    {

    #pragma unused params

    ShowPlayerDialog(playerid,bvip,DIALOG_STYLE_LIST,"BuyVip","{FFFFFF}Level 1 {FFAF00} --> {FF0000} 20 Ore\n{FFFFFF}Level 2 {FFAF00} --> {FF0000} 40 Ore\n{FFFFFF}Level 3 {FFAF00} --> {FF0000}60 Ore","Select","Cancel);

    return 1;

    }

    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

    {

    if (dialogid == bvip)

    {

    if(response)

    {

    if(listitem == 0)

    {

    if AccInfo[playerid][hours] >= 5) //Orele care trebuie sa le aiba playerul :P

    {

    AccInfo[playerid][pVip] = 1; //Levelul la VIP

    AccInfo[playerid][hours] -= 5;

    }

    else

    {

    SendClienMessage(playerid,green,"Nu ai destule ore pentru a cumpara VIP !"); //Mesajul daca nu are ore destule

    }

    }

    if(listitem == 1)

    {

    if AccInfo[playerid][hours] >= 10) //Orele pentru a cumpara VIP

    {

    AccInfo[playerid][pVip] = 2; //Levelul de VIP

    AccInfo[playerid][hours] -= 10;

    }

    else

    {

    SendClienMessage(playerid,green,"Nu ai destule ore pentru a cumpara VIP !"); //Mesajul daca nu are ore suficiente

    }

    }

    if (listitem == 2)

    {

    if AccInfo[playerid][hours] >= 15) //Orele care trebuiesc pentru a cumpara VIP

    {

    AccInfo[playerid][pVip] = 3; //Levelul VIP

    AccInfo[playerid][hours] = 15;

    }

    else

    {

    SendClienMessage(playerid,green,"Nu ai destule ore pentru a cumpara VIP !"); //Mesajul daca nu are destule ore

    }

    }

    }

    return 1;

    }[/pawn]

Si la compilare primesc erori:

C:\Users\Hunor\Desktop\testing.pwn(478) : error 017: undefined symbol "UpdateConfig"
C:\Users\Hunor\Desktop\testing.pwn(479) : error 017: undefined symbol "ReadTextDraws"
C:\Users\Hunor\Desktop\testing.pwn(498) : error 017: undefined symbol "ShowConfigInConsole"
C:\Users\Hunor\Desktop\testing.pwn(523) : error 004: function "SaveTeleport" is not implemented
C:\Users\Hunor\Desktop\testing.pwn(625) : error 004: function "SaveIn" is not implemented
C:\Users\Hunor\Desktop\testing.pwn(640) : error 004: function "SaveIn" is not implemented
C:\Users\Hunor\Desktop\testing.pwn(660) : error 004: function "SaveIn" is not implemented
C:\Users\Hunor\Desktop\testing.pwn(703) : error 017: undefined symbol "LoginPlayer"
C:\Users\Hunor\Desktop\testing.pwn(775) : error 004: function "SaveIn" is not implemented
C:\Users\Hunor\Desktop\testing.pwn(793) : error 017: undefined symbol "SavePlayerStats"
C:\Users\Hunor\Desktop\testing.pwn(821) : error 004: function "EraseVeh" is not implemented
C:\Users\Hunor\Desktop\testing.pwn(827) : error 017: undefined symbol "AdvanceSpectate"
C:\Users\Hunor\Desktop\testing.pwn(1026) : error 017: undefined symbol "AdvanceSpectate"
C:\Users\Hunor\Desktop\testing.pwn(1043) : error 004: function "MessageToPlayerVIP" is not implemented
C:\Users\Hunor\Desktop\testing.pwn(1044) : error 004: function "SaveIn" is not implemented
C:\Users\Hunor\Desktop\testing.pwn(1054) : error 004: function "MessageToAdmins" is not implemented
C:\Users\Hunor\Desktop\testing.pwn(1056) : error 004: function "SaveIn" is not implemented
C:\Users\Hunor\Desktop\testing.pwn(1085) : error 004: function "SaveIn" is not implemented
C:\Users\Hunor\Desktop\testing.pwn(1103) : error 004: function "SaveIn" is not implemented
C:\Users\Hunor\Desktop\testing.pwn(1144) : error 017: undefined symbol "AdvertisementCheck"
C:\Users\Hunor\Desktop\testing.pwn(1157) : error 004: function "SaveIn" is not implemented
C:\Users\Hunor\Desktop\testing.pwn(1204) : error 004: function "SaveIn" is not implemented
C:\Users\Hunor\Desktop\testing.pwn(1225) : error 004: function "SaveIn" is not implemented
C:\Users\Hunor\Desktop\testing.pwn(1503) : error 017: undefined symbol "TotalGameTime"
C:\Users\Hunor\Desktop\testing.pwn(1826) : error 017: undefined symbol "ReturnUser"
C:\Users\Hunor\Desktop\testing.pwn(1848) : error 017: undefined symbol "SendCommandToAdmins"

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


26 Errors.

Deci stiu ca problema e la AccInfo acela,trebuie schimbat cum este la luxadmin pentru vip,dar nu stiu cum...Va rog ajutor!

PS:Sub OnPlayerCommandText mai am:[pawn]{

dcmd(buyvip,6,cmdtext);

return 1;

}[/pawn]

8 answers to this question

Recommended Posts

Posted

Acum partea aceia din script arata asa:[pawn]dcmd_buyvip(playerid,params[]) //Adaugati oriunde in GameMode :P

    {

    #pragma unused params

    ShowPlayerDialog(playerid,bvip,DIALOG_STYLE_LIST,"BuyVip","{FFFFFF}Level 1 {FFAF00} --> {FF0000} 5 Ore\n{FFFFFF}Level 2 {FFAF00} --> {FF0000} 10 Ore\n{FFFFFF}Level 3 {FFAF00} --> {FF0000}15 Ore","Select","Cancel");

    return 1;

    }

    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

    {

    if (dialogid == bvip)

    {

    if(response)

    {

    if(listitem == 0)

    {

    if AccInfo[playerid][hours] >= 5) //Orele care trebuie sa le aiba playerul :P

    {

    AccInfo[playerid][pVip] = 1; //Levelul la VIP

    AccInfo[playerid][hours] -= 5;

    }

    else

    {

    SendClientMessage(playerid,green,"Nu ai destule ore pentru a cumpara VIP !"); //Mesajul daca nu are ore destule

    }

    }

    if(listitem == 1)

    {

    if AccInfo[playerid][hours] >= 10) //Orele pentru a cumpara VIP

    {

    AccInfo[playerid][pVip] = 2; //Levelul de VIP

    AccInfo[playerid][hours] -= 10;

    }

    else

    {

    SendClientMessage(playerid,green,"Nu ai destule ore pentru a cumpara VIP !"); //Mesajul daca nu are ore suficiente

    }

    }

    if (listitem == 2)

    {

    if AccInfo[playerid][hours] >= 15) //Orele care trebuiesc pentru a cumpara VIP

    {

    AccInfo[playerid][pVip] = 3; //Levelul VIP

    AccInfo[playerid][hours] = 15;

    }

    else

    {

    SendClientMessage(playerid,green,"Nu ai destule ore pentru a cumpara VIP !"); //Mesajul daca nu are destule ore

    }

    }

    }

    }

    return 1;

    }[/pawn]

Iar primesc 12 erori:

C:\Users\Hunor\Desktop\testing.pwn(6736) : error 017: undefined symbol "bvip"
C:\Users\Hunor\Desktop\testing.pwn(6741) : error 017: undefined symbol "bvip"
C:\Users\Hunor\Desktop\testing.pwn(6747) : error 001: expected token: "*then", but found ")"
C:\Users\Hunor\Desktop\testing.pwn(6747) : error 029: invalid expression, assumed zero
C:\Users\Hunor\Desktop\testing.pwn(6752) : error 029: invalid expression, assumed zero
C:\Users\Hunor\Desktop\testing.pwn(6759) : error 001: expected token: "*then", but found ")"
C:\Users\Hunor\Desktop\testing.pwn(6759) : error 029: invalid expression, assumed zero
C:\Users\Hunor\Desktop\testing.pwn(6764) : error 029: invalid expression, assumed zero
C:\Users\Hunor\Desktop\testing.pwn(6771) : error 001: expected token: "*then", but found ")"
C:\Users\Hunor\Desktop\testing.pwn(6771) : error 029: invalid expression, assumed zero
C:\Users\Hunor\Desktop\testing.pwn(6776) : error 029: invalid expression, assumed zero
C:\Users\Hunor\Desktop\testing.pwn(7458) : warning 217: loose indentation
C:\Users\Hunor\Desktop\testing.pwn(7466) : warning 225: unreachable code
C:\Users\Hunor\Desktop\testing.pwn(8656) : error 021: symbol already defined: "OnDialogResponse"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


12 Errors.

Posted

trebuie sa definesti bvip si la celelalte pune in loc de [pawn]if AccInfo[playerid][hours][/pawn] [pawn]if (AccInfo[playerid][hours][/pawn]

iar la bvip [pawn]#define bvip 1000[/pawn]

 

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

 

Posted

Pentru a nu iti mai aparea

error 021: symbol already defined: "OnDialogResponse"
Sterge unde este definit la inceput si adauga unde ai nevoie de el la inceputul comenzi [pawn]new OnDialogResponse;[/pawn]
Posted

Pentru a nu iti mai aparea

Sterge unde este definit la inceput si adauga unde ai nevoie de el la inceputul comenzi [pawn]new OnDialogResponse;[/pawn]

"24.gif" <--- eu, dupa ce am citit comentariul de mai sus.Acea eroare iti spune ca OnDialogResponse se afla de doua sau mai multe ori in modul de joc.O solutie pentru a scapa de ea, este de a sterge dublicarea sau a incorporao cu celalalt OnDialogResponse.

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.