Szerző Téma: Error  (Megtekintve 1905 alkalommal)

herban

  • Vendég
Error
« Dátum: 2011. április 12. - 19:52:43 »
0 Show voters
Üdv.
Nem tudom mért ír ki hibát itt:
 
#define MAX_POINTS 2
new Float:checkCoords[MAX_POINTS][4] = {
{2095.636474, 1443.091796, 2175.636474, 1499.091796}
};

 
Hiba:
 

(91) : error 052: multi-dimensional arrays must be fully initialized
(114) : error 018: initialization data exceeds declared size
(133) : error 055: start of function body without function header
(144) : error 010: invalid function or declaration
(177) : error 018: initialization data exceeds declared size

Nem elérhető DrAkE

  • 2078
    • Profil megtekintése
Error
« Válasz #1 Dátum: 2011. április 12. - 19:56:00 »
0 Show voters
azért mert a dimenzióban 2 sor van definiálva közbe meg csak 1-et írtál/használtál benne.

herban

  • Vendég
Error
« Válasz #2 Dátum: 2011. április 12. - 19:57:54 »
0 Show voters
Akkor letudnád írni a helyes megoldást ha megkérlek?

Nem elérhető Mambo

  • 4239
    • Profil megtekintése
Error
« Válasz #3 Dátum: 2011. április 12. - 19:58:51 »
0 Show voters
Idézetet írta: herban date=1302631074\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"7514\" data-ipsquote-contentclass=\"forums_Topic
Akkor letudnád írni a helyes megoldást ha megkérlek?
 

#define MAX_POINTS 1

Koncz_Norbert

  • Vendég
Error
« Válasz #4 Dátum: 2011. április 12. - 19:59:19 »
0 Show voters
Köze nincs hozzá. Ha jól látom akkor használod akkor kérlek másold be azt is. :angel:

Nem elérhető DrAkE

  • 2078
    • Profil megtekintése
Error
« Válasz #5 Dátum: 2011. április 12. - 20:08:07 »
0 Show voters
Idézetet írta: Koncz_Norbert date=1302631159\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"7514\" data-ipsquote-contentclass=\"forums_Topic
Köze nincs hozzá. Ha jól látom akkor használod akkor kérlek másold be azt is. :angel:
 
Ezt mire is értetted pontosan?

Nem elérhető Mambo

  • 4239
    • Profil megtekintése
Error
« Válasz #6 Dátum: 2011. április 12. - 20:09:11 »
0 Show voters
Idézetet írta: DrAkE date=1302631687\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"7514\" data-ipsquote-contentclass=\"forums_Topic


Köze nincs hozzá. Ha jól látom akkor használod akkor kérlek másold be azt is. :angel:
 
Ezt mire is értetted pontosan?
 
[/quote]
Arra, hogy tökmindegy mennyit definiálsz.

Koncz_Norbert

  • Vendég
Error
« Válasz #7 Dátum: 2011. április 12. - 20:11:32 »
0 Show voters
A checkCoords-al nincs semmi probléma. Nem írta le teljesen a hiba okát csak beírta hogy itt a probléma mikor 91-nél 114-nél is van hiba, és így tovább...
És igen. Köszönöm, Mambo :D
Csak nelegyen 1-nél kevesebb...

Nem elérhető DrAkE

  • 2078
    • Profil megtekintése
Error
« Válasz #8 Dátum: 2011. április 12. - 20:13:03 »
0 Show voters
Hát nem egészen, ha deifiniálod a dimenzióban mennyi \"sort\" használsz akkor azt teljesen ki kell tölteni.
Azért is van ez a hiba:
 
error 052: multi-dimensional arrays must be fully initialized

 
De ajánlom hogy ne definiáljuk mennyi \"sort\" használ a dimenzió, egyszerûbb ha kitöröljük az értéket.

Koncz_Norbert

  • Vendég
Error
« Válasz #9 Dátum: 2011. április 12. - 20:18:11 »
0 Show voters
Idézetet írta: DrAkE date=1302631983\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"7514\" data-ipsquote-contentclass=\"forums_Topic
Hát nem egészen, ha deifiniálod a dimenzióban mennyi \"sort\" használsz akkor azt teljesen ki kell tölteni.
Azért is van ez a hiba:
 
error 052: multi-dimensional arrays must be fully initialized

 
De ajánlom hogy ne definiáljuk mennyi \"sort\" használ a dimenzió, egyszerûbb ha kitöröljük az értéket.
 
Az érdekes, mivel nem írta meg hogy ott a hiba. A 91. sor bármi lehet...
Nálam nem ír problémát xD Csak annyit hogy undefined symbol...

herban

  • Vendég
Error
« Válasz #10 Dátum: 2011. április 12. - 20:59:59 »
0 Show voters
Szóval akkor mit tegyek mert még mindig error van?
 

89.new Float:checkCoords[MAX_POINTS][2] = {
90.{2095.636474, 1443.091796, 2175.636474, 1499.091796}
91.};
« Utoljára szerkesztve: 2011. április 12. - 21:04:13 írta herban »

Koncz_Norbert

  • Vendég
Error
« Válasz #11 Dátum: 2011. április 12. - 21:27:25 »
0 Show voters
Idézetet írta: herban date=1302634799\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"7514\" data-ipsquote-contentclass=\"forums_Topic
Szóval akkor mit tegyek mert még mindig error van?
 

89.new Float:checkCoords[MAX_POINTS][2] = {
90.{2095.636474, 1443.091796, 2175.636474, 1499.091796}
91.};

 

Nah most meg 2-es kombinációt adsz meg mikor 4 pontot adtál meg.
 

new Float:checkCoords[1][4] = {
{2095.636474, 1443.091796, 2175.636474, 1499.091796}
};
// Csak tesztként és hogy jól használd ;)
new faxLOL = random(sizeof(checkCoords));
SetPlayerPos(playerid, checkCoords[faxLOL][0], checkCoords[faxLOL][1], checkCoords[faxLOL][2]);
SetPlayerFacingAngle(playerid, checkCoords[faxLOL][3]);
« Utoljára szerkesztve: 2011. április 12. - 21:29:03 írta Koncz_Norbert »

Error
« Válasz #12 Dátum: 2011. április 13. - 18:55:40 »
0 Show voters
Idézetet írta: Koncz_Norbert date=1302636445\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"7514\" data-ipsquote-contentclass=\"forums_Topic


new Float:checkCoords[1][4] = {
{2095.636474, 1443.091796, 2175.636474, 1499.091796} };
// Csak tesztként és hogy jól használd ;)
new faxLOL = random(sizeof(checkCoords));
SetPlayerPos(playerid, checkCoords[faxLOL][0], checkCoords[faxLOL][1], checkCoords[faxLOL][2]);
SetPlayerFacingAngle(playerid, checkCoords[faxLOL][3]);

 
Hülyeség.. Ha megnézed, egy úgynevezett \"Area\" koordinátái.


Mondjuk ha bemásolnád azt a részt, amire kiírja a hibát, sokat segítene.

Koncz_Norbert

  • Vendég
Error
« Válasz #13 Dátum: 2011. április 13. - 19:07:37 »
0 Show voters
Idézetet írta: TengeriMalac date=1302713740\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"7514\" data-ipsquote-contentclass=\"forums_Topic


 

new Float:checkCoords[1][4] = {
{2095.636474, 1443.091796, 2175.636474, 1499.091796} };
// Csak tesztként és hogy jól használd ;)
new faxLOL = random(sizeof(checkCoords));
SetPlayerPos(playerid, checkCoords[faxLOL][0], checkCoords[faxLOL][1], checkCoords[faxLOL][2]);
SetPlayerFacingAngle(playerid, checkCoords[faxLOL][3]);

 
Hülyeség.. Ha megnézed, egy úgynevezett \"Area\" koordinátái.


Mondjuk ha bemásolnád azt a részt, amire kiírja a hibát, sokat segítene.
 
[/quote]
Akkor elég érdekes kordináta :dodge:
Ezen kívül: checkCoords[1][4] ... Az elsõ rublikána mindig adsz +1-et mikor új sort hozol létre.
A második rublikába vagyis a \"[4]\" ott meg annyit írsz bele ahányszor használod azt a sort. példának leírtam:
 

new faxLOL = random(sizeof(checkCoords));
SetPlayerPos(playerid, checkCoords[faxLOL][0], checkCoords[faxLOL][1], checkCoords[faxLOL][2]);
SetPlayerFacingAngle(playerid, checkCoords[faxLOL][3]);

 
Megadunk egy változót(faxLOL) amit véletlen szerûen kifog választani.
Majd valamelyik fv.-ben kiválasztod hogy melyik a pontos: checkCoords[faxLOL][0] vagyis: 2095.636474,
 checkCoords[faxLOL][1] vagyis: 1443.091796 és így tovább.
És sry a helytelen szakszavakért! :-X (Nem tanultam be, hanem elég ha tudom. Nem?!)

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal