Jump to content
  • 0

WantedTextdraw


Sammich

Question

Problema intalnita (descriere):Salut,vreau sa fac ca pe Bugged un textdraw cu Wanted scade in: 15 minute .Am facut texdraw-ul Am pus la new asta:

------------------------------------------

new Text:WantedScade[MAX_PLAYERS];

----------------------------------

Pe urma am adaugat textdraw-ul la OnGameModeInit si in ultimul rand am adaugat la  OnPlayerStateChange asta

-----------------------------------------------------------------------------------

        if(playerVariables[playerid][pWarrants] >= 1)
        {
            new string2[256];
            format(string2, 256, "Wanted scade in: ~r~ %d secunde", CalculeazaTimp(WantedTime));
            TextDrawSetString(WantedScade[playerid], string2);
        }

-------------------------------------------------------------------------------------------
Ero(area / rile) / warning-(ul / urile): Si imi da eroare asta "D:\Gamemoduri\bugged!\gamemodes\rpg.pwn(7817) : error 017: undefined symbol "i" "
Liniile de cod / sursa / script-ul(obligatoriu): Linia de cod este asta "format(string2, 256, "Wanted scade in: ~r~ %d secunde", CalculeazaTimp(WantedTime)); "
Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Da

 
Link to comment
Share on other sites

19 answers to this question

Recommended Posts

  • 0

Da-ne functia CalculeazaTimp.

stockarrow-10x10.pngCalculeazaTimp(secunde)
{
    new time = secunde;
    time = time%3600;
    new minute = time/60;
    time = time%60;
    new secunde2 = time;
    new string[10];
    format(string, sizeof(string),"%02d:%02d",minute,secunde2);
    return string;
}

 
Link to comment
Share on other sites

  • 0

Uite,asta este eroare :

---------------------------------------------------------------------------------------------

D:\Gamemoduri\bugged!\gamemodes\rpg.pwn(7817) : error 017: undefined symbol "i"
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

---------------------------------------------------------------------------------------------

Si asta este linia de cod:

---------------------------------------------------------------------------------------------

format(string2, 256, "Wanted scade in: ~r~ %d secunde", CalculeazaTimp(WantedTime));

---------------------------------------------------------------------------------------------

 
 

Uite http://i.imgur.com/EE0WUMe.png

 
Edited by Sammich
Link to comment
Share on other sites

  • 0

Uite,asta este eroare :

---------------------------------------------------------------------------------------------

D:\Gamemoduri\bugged!\gamemodes\rpg.pwn(7817) : error 017: undefined symbol "i"
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

---------------------------------------------------------------------------------------------

Si asta este linia de cod:

---------------------------------------------------------------------------------------------

format(string2, 256, "Wanted scade in: ~r~ %d secunde", CalculeazaTimp(WantedTime));

---------------------------------------------------------------------------------------------

 
 

Uite http://i.imgur.com/EE0WUMe.png

 

Da, pai tu nu ai transcris linia problema bine. (WantedTime)

format(string2, 256, "Wanted scade in: ~r~ %d secunde", CalculeazaTimp(WantedTime[playerid]));

Solved.

 

 

Edited by KnowN

242086.png

Link to comment
Share on other sites

  • 0

Acum imi da warning-urile astea:

----------------------------------------------------------------------

D:\Gamemoduri\bugged!\gamemodes\rpg.pwn(7818) : warning 213: tag mismatch
D:\Gamemoduri\bugged!\gamemodes\rpg.pwn(7818) : warning 213: tag mismatch

-------------------------------------------------------------------

Linia 7818 este asta :

--------------------------------------------------------------

TextDrawSetString(playerid, WantedScade[playerid]);

--------------------------------------------------------------

 
Link to comment
Share on other sites

  • 0

Acum imi da warning-urile astea:

----------------------------------------------------------------------

D:\Gamemoduri\bugged!\gamemodes\rpg.pwn(7818) : warning 213: tag mismatch
D:\Gamemoduri\bugged!\gamemodes\rpg.pwn(7818) : warning 213: tag mismatch

-------------------------------------------------------------------

Linia 7818 este asta :

--------------------------------------------------------------

TextDrawSetString(playerid, WantedScade[playerid]);

--------------------------------------------------------------

 

Pune

TextDrawSetString(WantedScade[playerid], string2);

Stiu ca am zis ca parametrii sunt gresiti, dar eram putin cu capul in nori :))

E bun asa.

242086.png

Link to comment
Share on other sites

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.