Szerző Téma: Itt kérdezz warningot/error -t!  (Megtekintve 125186 alkalommal)

Itt kérdezz warningot/error -t!
« Válasz #705 Dátum: 2014. Október 29. - 15:52:19 »
0
Sziasztok van egy stats parancsom amit dialogba tettem de pár sor ahol nem érték, hanem szöveg lenne valamiért errort ír.
 Error: argument type mismatch (argument 3)
 

new DIALOGstring[1024];
        strcat(DIALOGstring, \"%s\", GetName(playerid));
        strcat(DIALOGstring, \"{FF0000}Rang: {fbff7f}%i\\n\", AdminRang);

 
       
Error: warning 202: number of arguments does not match definition
       
 

strcat(DIALOGstring, \"{f7ff00}Játszott óra:{fbff7f} %d óra és %d perc\\n\",PlayerInfo[playerid][Hours],PlayerInfo[playerid][Minutes])

 
Köszi a segítséget!

Nem elérhető divkn

  • 3259
    • Profil megtekintése
Itt kérdezz warningot/error -t!
« Válasz #706 Dátum: 2014. Október 29. - 16:02:34 »
0
strcat funkciónak nincs argumentumai. format funkcióval csináld meg.
 
new DIALOGstring[1024];
format(DIALOGstring,sizeof(DIALOGstring),\"%s {FF0000}Rang: {fbff7f}%i\", GetName(playerid), AdminRang);

 

format(DIALOGstring,sizeof(DIALOGstring),\"{f7ff00}Játszott óra:{fbff7f} %d óra és %d perc\\n\",PlayerInfo[playerid][Hours],PlayerInfo[playerid][Minutes]);

Itt kérdezz warningot/error -t!
« Válasz #707 Dátum: 2014. Október 29. - 17:41:14 »
0
Köszi divkn egy kis módosítással sikerült megoldanom mindent:)

Itt kérdezz warningot/error -t!
« Válasz #708 Dátum: 2014. Október 29. - 17:56:38 »
0
Idézetet írta: divkn date=1414592799\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"22125\" data-ipsquote-contentclass=\"forums_Topic
OnPlayerCommandTextnél a cmdtext paraméternél ott van a kapcsos zárójel?
 
public OnPlayerCommandText(playerid, cmdtext[]) // ...

 

Ez megvolt végig.A probléma továbbra is fenntáll.

Nem elérhető huhboy

  • 894
  • huhboy
    • Profil megtekintése
Itt kérdezz warningot/error -t!
« Válasz #709 Dátum: 2014. Október 29. - 22:52:21 »
0
Idézetet írta: PeterBlue date=1414601798\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"22125\" data-ipsquote-contentclass=\"forums_Topic


OnPlayerCommandTextnél a cmdtext paraméternél ott van a kapcsos zárójel?
 
public OnPlayerCommandText(playerid, cmdtext[]) // ...

 

Ez megvolt végig.A probléma továbbra is fenntáll.
 
[/quote]
valahol máshol lesz a probléma....a paranccsal nincs gond, szóval vagy az a_samp inc-edbe van belenyúlva, vagy előtte van hiba..

Itt kérdezz warningot/error -t!
« Válasz #710 Dátum: 2014. Október 30. - 19:28:10 »
0
Az a_samp.inc hibátlan, a probléma továbbra is fennáll.
Gondolom ezután nem tudjuk megoldani :S

Dupla hozzászólás automatikusan összefûzve. ( 2014. Október 30. - 19:35:52 )

Sikerült megoldani!
Megoldás:
Néhány new-et ki kellett törölni(warning alatt látod majd hogy hol vannak)
És pár sscanf-os cucc zavart még be!
« Utoljára szerkesztve: 2014. Október 30. - 19:35:52 írta PeterBlue »

Nem elérhető divkn

  • 3259
    • Profil megtekintése
Itt kérdezz warningot/error -t!
« Válasz #711 Dátum: 2014. Október 30. - 19:46:15 »
0
Milyen függvénykönyvtárakat használsz? Van a szkriptben strcmp-vel kapcsolatos javítás, kiegészítés vagy valami?

Itt kérdezz warningot/error -t!
« Válasz #712 Dátum: 2014. Október 30. - 21:39:44 »
0
Csak a szkript elejéről szedtem ki a zcmd include-ot, a public onplayercommandperformed részt+még 2-3 dolgot amit az előző kommentemben leírtam. A többit nem tudtam értelmezni, számomra káromkodás :D

Itt kérdezz warningot/error -t!
« Válasz #713 Dátum: 2014. November 02. - 20:31:29 »
0
Sziasztok segítség kéne
 
C:\\Users\\Zsolti\\Desktop\\Cuccok\\GTA\\[HUN]Race Server\\pawno\\include\\YSI\\..\\YSI_Storage\\y_amx.inc(77) : fatal error 100: cannot read from file: \"..\\amx\\asm\"
Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
1 Error.

 
 ezt az errort hogy tudom kiküszöbölni?
[gmod]Kitettem helyetted a

taget![/gmod]
« Utoljára szerkesztve: 2014. November 02. - 22:53:40 írta Dfoglalo »

Nem elérhető nyomo

  • 159
    • Profil megtekintése
Itt kérdezz warningot/error -t!
« Válasz #714 Dátum: 2014. November 03. - 19:59:52 »
0
Szerver elindítása utána ez fogad a konzolba mikor lefut az a timer amivel meghívom a problémás függvényt. A hiba onnantól van, hogy a megtettkm változóz tömbbe kezdtem el használni és nem jöttem még rá, hogy mi a hiba. Ha nincs csatlakozva játékos le sem kéne futni addig, hogy a változó befolyásolja, vagy nem jól gondolom? Még egy másik függvénynél is ugyan ez a hiba, ott is tömbként használom.
- Run time error 4: \"Array index out of bounds\"
A függvény:
 
stock FutottKm()
{
new CarRegId;
    for(new i = 0;i < MAX_PLAYERS;i++)
    {
if(IsPlayerConnected(i))
{
   if(IsPlayerInAnyVehicle(i) && !GetPlayerVehicleSeat(i))
   {
      CarRegId = GetRegId(GetPlayerVehicleID(i));
      CarInfo[CarRegId][MegtettKm] += GetSpeed(i)*0.000278;  //asdasdasd
   }
}
    }
}

 
konzol:
\"width=500http://kepfeltoltes.hu/141103/1403318034n_vtelen_www.kepfeltoltes.hu_.jpg[/img]
Megoldva! AddStaticVehicleEx függvénnyel lettek létrehozva a játékmód betöltésénél a kocsik, így nem lehetett id-hez rendelni létrehozott járműveket, így a CarRegId függvény sem működött.
« Utoljára szerkesztve: 2014. November 04. - 01:23:17 írta nyomo »

Itt kérdezz warningot/error -t!
« Válasz #715 Dátum: 2014. November 03. - 21:30:54 »
0
Sziasztok!
Ebben valaki segítene?mi lehet ez az error?
 
C:\\Users\\Zsolti\\Desktop\\Cuccok\\GTA\\[HUN]Race Server\\pawno\\include\\YSI\\..\\YSI_Storage\\phys_memory.inc(28) : fatal error 100: cannot read from file: \"amx_base\"
Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
1 Error.

Nem elérhető Thomas_Jonson

  • 560
  • Thomas_Jonson
    • Profil megtekintése
Itt kérdezz warningot/error -t!
« Válasz #716 Dátum: 2014. November 03. - 21:37:33 »
0
Idézetet írta: lanviier date=1415046654\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"22125\" data-ipsquote-contentclass=\"forums_Topic
Sziasztok!
Ebben valaki segítene?mi lehet ez az error?
 
C:\\Users\\Zsolti\\Desktop\\Cuccok\\GTA\\[HUN]Race Server\\pawno\\include\\YSI\\..\\YSI_Storage\\phys_memory.inc(28) : fatal error 100: cannot read from file: \"amx_base\"
Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
1 Error.

 

Talán ha egy függvényt tennél ki lehet könnyebb dolgunk lenne.

Itt kérdezz warningot/error -t!
« Válasz #717 Dátum: 2014. November 03. - 21:47:06 »
0
Nem a codeban van a baj, hanem az YSI -vel van problem.

Frissítsd le
ERRE

Talán jó lessz :D

Itt kérdezz warningot/error -t!
« Válasz #718 Dátum: 2014. November 04. - 21:24:48 »
0
Idézetet írta: Thomas -™ • ツ date=1415047053\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"22125\" data-ipsquote-contentclass=\"forums_Topic


Sziasztok!
Ebben valaki segítene?mi lehet ez az error?
 
C:\\Users\\Zsolti\\Desktop\\Cuccok\\GTA\\[HUN]Race Server\\pawno\\include\\YSI\\..\\YSI_Storage\\phys_memory.inc(28) : fatal error 100: cannot read from file: \"amx_base\"
Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
1 Error.

 

Talán ha egy függvényt tennél ki lehet könnyebb dolgunk lenne.
 
[/quote]
ja igen el is felejtettem bocsi, itt is a függvény
 
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart) {
        if(bodypart ==  7 || bodypart == 8) {
                if(damagedid != INVALID_PLAYER_ID && IsPlayerConnected(damagedid)) {
                        TogglePlayerControllable(damagedid, false);
                        ApplyAnimation(damagedid, \"SWEET\", \"Sweet_injuredloop\", 4.0, 1, 0, 0, 0, 0);
                        SetPlayerArmedWeapon(damagedid, 0);
                        SendClientMessage(damagedid, -1, \"Lábon lőttek, ezért a földre kerültél!\");
                }
        }
        return 1;
}

 
[gmod]Javítottam helyetted a

taget

tagre![/gmod]
« Utoljára szerkesztve: 2014. November 04. - 21:53:33 írta Dfoglalo »

Itt kérdezz warningot/error -t!
« Válasz #719 Dátum: 2014. November 04. - 21:38:09 »
0
Idézetet írta: lanviier date=1415046654\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"22125\" data-ipsquote-contentclass=\"forums_Topic

C:\\Users\\Zsolti\\Desktop\\Cuccok\\GTA\\[HUN]Race Server\\pawno\\include\\YSI\\..\\YSI_Storage\\phys_memory.inc(28) : fatal error 100: cannot read from file: \"amx_base\"
Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
1 Error.

 



Nem a codeban van a baj, hanem az YSI -vel van problem.

Frissítsd le
ERRE


 
[/quote]

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal