←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

Motd dziwny błąd

  • +
  • -
1stADXionC - zdjęcie 1stADXionC 27.09.2015

Witam.

Okno motd otwiera się ładnie lecz jak dodam tą linijkę automatycznie nie działa.

 len += formatex(motd[len],sizeof motd - 1 - len,"<td><b><font color=white><br><center>Przedmiot <br><font color=green> %s </center><br></font></td><td><b><font color=white><br><center>Wytrzymalosc<font color=%s> %s </font></center><br></td></table><br>", nazwy_runy[runa_gracza[id]], szTime)
public OpisRuny(id)
{
static szTime[3];
format_time(szTime, 2, "%M", g_iUserTimer[id]);


new opis_runy[MAX_WIELKOSC_OPISU];


static motd[1050],header[100],len
len = 0
len += formatex(motd[len],sizeof motd - 1 - len,"<body bgcolor=#000000 text=#FFB000>")
len += formatex(motd[len],sizeof motd - 1 - len,"<table bordercolor=3366FF width=700 border=1 cellpadding=4 cellspacing=8>")
len += formatex(motd[len],sizeof motd - 1 - len,"<table bordercolor=3366FF width=700 border=1 cellpadding=4 cellspacing=8>")
len += formatex(motd[len],sizeof motd - 1 - len,"<td><font color=white><br><center><b> %s </center><br></font></td></table><br>", opisy_runy)


formatex(header,sizeof header - 1,"Przedmiot")


show_motd(id,motd,header)      
}

 

 

 
L 09/27/2015 - 17:30:52: String formatted incorrectly - parameter 6 (total 5)
L 09/27/2015 - 17:30:52: [AMXX] Displaying debug trace (plugin "cod_silnik.amxx")
L 09/27/2015 - 17:30:52: [AMXX] Run time error 25: parameter error 
L 09/27/2015 - 17:30:52: [AMXX]    [0] cod_silnik.sma::OpisRuny (line 706)
L 09/27/2015 - 17:30:52: [AMXX]    [1] cod_silnik.sma::KomendaOpisRuny (line 685)
L 09/27/2015 - 17:30:52: [AMXX]    [2] cod_silnik.sma::runa_handle (line 591)
 

Użytkownik 1stADXionC edytował ten post 27.09.2015 16:31
Odpowiedz

  • +
  • -
NoLiFeR - zdjęcie NoLiFeR 13.10.2015

1. Niepotrzebnie tworzysz nową zmienną na header. Wpisz go tak

show_motd(id,motd,"Przedmiot");

2.

static motd[1050],header[100],len
len = 0

>>

static motd[1050],header[100],len = 0;

3.

opisy_runy musi występować z indexem, chb że masz jedną rune (Nazwa zmiennej sygnalizuje że nie...)

 

4. Po co Ci to ?
 


new opis_runy[MAX_WIELKOSC_OPISU];

Odpowiedz