Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: ceLL_ poslato Oktobar 29, 2010, 23:44:07 POSLE PODNE

Naslov: [Pomoc] Errori -.-'
Poruka od: ceLL_ poslato Oktobar 29, 2010, 23:44:07 POSLE PODNE
Evo ovako sam ja to uradio pod OnDialogResponse za jednu komandu.....

                              if(dialogid == 1000)
                {
                if(response)
                {
                if(listitem == 0)
                {
                  SendClientMessage(playerid, 0x33AA33AA, "%s pije Vodu!");
                  GivePlayerMoney(playerid,-15);
                  SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
                  SetPlayerHealth(playerid, health + 50.0);
                }
               
                if(listitem == 1)
                {
                  SendClientMessage(playerid, 0x33AA33AA, "%s pije LaVitu!");
                  GivePlayerMoney(playerid,-15);
                  SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
                  SetPlayerHealth(playerid, health + 50.0);
                }
               
                if(listitem == 2)
                {
                  SendClientMessage(playerid, 0x33AA33AA, "%s pije CocaColu!");
                  GivePlayerMoney(playerid,-15);
                  SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
                  SetPlayerHealth(playerid, health + 50.0);
                }
               
                if(listitem == 3)
                {
                  SendClientMessage(playerid, 0x33AA33AA, "%s pije Lav Pivo!");
                  GivePlayerMoney(playerid,-15);
                  SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
                  SetPlayerHealth(playerid, health + 50.0);
                }
               
                if(listitem == 4)
                {
                  SendClientMessage(playerid, 0x33AA33AA, "%s pije Jelen Pivo!");
                  GivePlayerMoney(playerid,-15);
                  SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
                  SetPlayerHealth(playerid, health + 50.0);
                }
               
                if(listitem == 5)
                {
                  SendClientMessage(playerid, 0x33AA33AA, "%s pije Vinjak!");
                  GivePlayerMoney(playerid,-15);
                  SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
                  SetPlayerHealth(playerid, health + 50.0);
                }
               
                if(listitem == 6)
                {
                  SendClientMessage(playerid, 0x33AA33AA, "%s pije Pelinkovac!");
                  GivePlayerMoney(playerid,-15);
                  SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
                  SetPlayerHealth(playerid, health + 50.0);
                }
                }
                return 1;
                }



I pojave mi se ovi errori...A nmg tacno da se setim sta to znaci -.-'

C:\Documents and Settings\Administrator\Desktop\SmartEx RolePlay 0.3b\gamemodes\pfrp.pwn(13443) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\SmartEx RolePlay 0.3b\gamemodes\pfrp.pwn(13445) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\SmartEx RolePlay 0.3b\gamemodes\pfrp.pwn(13447) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\SmartEx RolePlay 0.3b\gamemodes\pfrp.pwn(13456) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\SmartEx RolePlay 0.3b\gamemodes\pfrp.pwn(13465) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\SmartEx RolePlay 0.3b\gamemodes\pfrp.pwn(13474) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\SmartEx RolePlay 0.3b\gamemodes\pfrp.pwn(13483) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\SmartEx RolePlay 0.3b\gamemodes\pfrp.pwn(13492) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\SmartEx RolePlay 0.3b\gamemodes\pfrp.pwn(13501) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\SmartEx RolePlay 0.3b\gamemodes\pfrp.pwn(13510) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


10 Errors.


Moze Pomoc?

Molim bespotrebne i nevezane komentare da ne pisete!
Naslov: Odg: [Pomoc] Errori -.-'
Poruka od: | MARKO | poslato Oktobar 30, 2010, 00:23:38 PRE PODNE
postaj te linije na kojima ti javlja error
Naslov: Odg: [Pomoc] Errori -.-'
Poruka od: black_dota poslato Oktobar 30, 2010, 00:29:20 PRE PODNE
samo napises

SetPlayerHealth(playerid,50);

umeso ovog

SetPlayerHealth(playerid, health + 50.0);

msm da je to problm
Naslov: Odg: [Pomoc] Errori -.-'
Poruka od: ceLL_ poslato Oktobar 30, 2010, 01:45:51 PRE PODNE
if(dialogid == 1000) Linija 13443

if(response) Linija 13445

if(listitem == 0) Linija 13447

if(listitem == 1)
                {     
Linija 13456 (Ta zagrada je error)

SendClientMessage(playerid, 0x33AA33AA, "%s pije CocaColu!"); Linija 13465

GivePlayerMoney(playerid,-15); Linija 13474

SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER); Linija 13483

SetPlayerHealth(playerid,100); Linija 13492

SetPlayerHealth(playerid,100);
}
Linija 13501 (Ta zagrada je error)

new playermoney; Linija 1510

Preznojao sam se dok sam izvukao linije.... :D
Naslov: Odg: [Pomoc] Errori -.-'
Poruka od: BloodMaster poslato Oktobar 30, 2010, 12:59:07 POSLE PODNE
Tebi ce u chatu pisat: %s pije vodu. A ne npr. Marko pije vodu. %s, %d i %i ide u string, a i da si stavio u string opet nebi radilo jer nemas getplayername, evo ti za to:

new k[64];
new z[64];
GetPlayerName(playerid,z,sizeof(z));
format(k,sizeof(k),"%s pije vodu.",z);
SendClientMessage(playerid,0xff0ac00,k);

Ali ovu poruku vidi samo igrac, tj. Bolje koristi proxdetector.

A daj nam tocne redove, a, ak skuzim, roknut cu edit...
Naslov: Odg: [Pomoc] Errori -.-'
Poruka od: BloodMaster poslato Oktobar 30, 2010, 13:21:23 POSLE PODNE
moze i

new z[MAX_PLAYER_NAME];

to je najtocnije.
Naslov: Odg: [Pomoc] Errori -.-'
Poruka od: black_dota poslato Oktobar 30, 2010, 13:40:56 POSLE PODNE
Citat: Pooh poslato Oktobar 30, 2010, 00:38:04 PRE PODNE
I sta onda? Ako ima 100hp i popije to imace 50... lol  :o
ma nesto sam se zajebo xD
Naslov: Odg: [Pomoc] Errori -.-'
Poruka od: ceLL_ poslato Oktobar 30, 2010, 14:13:38 POSLE PODNE
Citat: [Saw]BloodMaster poslato Oktobar 30, 2010, 12:59:07 POSLE PODNE
Tebi ce u chatu pisat: %s pije vodu. A ne npr. Marko pije vodu. %s, %d i %i ide u string, a i da si stavio u string opet nebi radilo jer nemas getplayername, evo ti za to:

new k[64];
new z[64];
GetPlayerName(playerid,z,sizeof(z));
format(k,sizeof(k),"%s pije vodu.",z);
SendClientMessage(playerid,0xff0ac00,k);

Ali ovu poruku vidi samo igrac, tj. Bolje koristi proxdetector.

A daj nam tocne redove, a, ak skuzim, roknut cu edit...

Kako mislis tocne redove....
Na koje redove mislis?
Naslov: Odg: [Pomoc] Errori -.-'
Poruka od: BloodMaster poslato Oktobar 30, 2010, 19:20:47 POSLE PODNE
Na kojima ti se pojavljuje eror. Probaj umjesto SetPlayerHealth ovo:

new Float:y;
GetPlayerHealth(playerid,y);
SetPlayerHealth(playerid, y+50);
Naslov: Odg: [Pomoc] Errori -.-'
Poruka od: ceLL_ poslato Oktobar 30, 2010, 19:23:16 POSLE PODNE
Citat: [Saw]BloodMaster poslato Oktobar 30, 2010, 19:20:47 POSLE PODNE
Na kojima ti se pojavljuje eror. Probaj umjesto SetPlayerHealth ovo:

new Float:y;
GetPlayerHealth(playerid,y);
SetPlayerHealth(playerid, y+50);

pa imas tacne linije errora gore sam stavio!

Sad nisam kuci,pa probacu ovo da uradim sa SetPlayerHealth ! Pa cu da vidim!
Naslov: Odg: [Pomoc] Errori -.-'
Poruka od: BloodMaster poslato Oktobar 30, 2010, 19:28:31 POSLE PODNE
Stavio si cjelu skriptu, nisi naveo koje je koji red.
Naslov: Odg: [Pomoc] Errori -.-'
Poruka od: ceLL_ poslato Oktobar 30, 2010, 19:36:02 POSLE PODNE
Jesam,stavio sam... POST broj 6... :D

Sve lepo koji je koji red... Evo ovo
Citat: Marjan_DeFox poslato Oktobar 30, 2010, 01:45:51 PRE PODNE
if(dialogid == 1000) Linija 13443

if(response) Linija 13445

if(listitem == 0) Linija 13447

if(listitem == 1)
                {     
Linija 13456 (Ta zagrada je error)

SendClientMessage(playerid, 0x33AA33AA, "%s pije CocaColu!"); Linija 13465

GivePlayerMoney(playerid,-15); Linija 13474

SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER); Linija 13483

SetPlayerHealth(playerid,100); Linija 13492

SetPlayerHealth(playerid,100);
}
Linija 13501 (Ta zagrada je error)

new playermoney; Linija 1510

Preznojao sam se dok sam izvukao linije.... :D
Naslov: Odg: [Pomoc] Errori -.-'
Poruka od: Aleksandar? poslato Oktobar 30, 2010, 19:49:51 POSLE PODNE
if(strcmp(cmd, "/pica", true) == 0)
{
    if(PlayerToPoint(10.0,playerid,376.6681,-67.4362,1001.5078))
    {
            ShowPlayerDialog(playerid, 1000, DIALOG_STYLE_LIST, "Lista pica", "CocaCola \nPivo ", "U redu", "Odustani");
        }
        return 1;
    }


pa onda ispod ondialogresponse


if(dialogid == 1000)
{
if(response)
{
    if(listitem == 0)
{
GivePlayerMoney(playerid, - 50);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
DajIgracuHP(playerid,30);
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije CocaColu.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
if(listitem == 1)
{
GivePlayerMoney(playerid, - 60);
                                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
DajIgracuHP(playerid,30);
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije pivo.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
return 1;
}


potrebno ti je i ovo ako nemas:
stock DajIgracuHP(playerid,Float:Health)
{
new Float:health; GetPlayerHealth(playerid,health);
SetPlayerHealth(playerid,health+Health);
}


tako bi ti trebalo raditi.. provjeri samo zagrade da nisam negdje fulo...
Naslov: Odg: [Pomoc] Errori -.-'
Poruka od: ceLL_ poslato Oktobar 30, 2010, 21:03:11 POSLE PODNE
Fulio si negde zagrade ali resio sam... ;) Hvala ti

Nego de vidi ovde- Uspeo sam da resim ali ima jedan problem!

http://balkan-samp.com/forum/index.php?topic=14532.msg105152#msg105152 (http://balkan-samp.com/forum/index.php?topic=14532.msg105152#msg105152)