SA-MP Forums Archive
Dialog problems - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog problems (/showthread.php?tid=305402)



Dialog problems - FireKill - 22.12.2011

The compile is not running, because it is wrong, but i do not know why:

else if(dialogid == DIALOG_PIAC)
{
listitem++;
switch(termekek)
{
case 1;
{
if(GetMoney(playerid) < 10000)
{
format(string, sizeof(string), "Ezt nem tudod kifizetni...");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
return 1;
}
if(PiacInfo[fMati] < 400)
{
Msg(playerid, "A gyбrnak nincs elйg alkatrйsze a fegyver цsszerakбsбhoz...");
return 1;
}
GiveMoney(playerid, -10000);
GiveWeapon(playerid, 24, 150);
Cselekves(playerid "vett valamit...");
PiacInfo[fMati] = PiacInfo[fMati] - 400;
format(string, sizeof(string), "Sikeresen vettйl egy deagle-t");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, "Piac", string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
}
case 2;
{
if(GetMoney(playerid) < 8000)
{
format(string, sizeof(string), "Ezt nem tudod kifizetni...");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
return 1;
}
if(PiacInfo[fMati] < 300)
{
Msg(playerid, "A gyбrnak nincs elйg alkatrйsze a fegyver цsszerakбsбhoz...");
return 1;
}
GiveMoney(playerid, -8000);
GiveWeapon(playerid, 22, 150);
Cselekves(playerid "vett valamit...");
PiacInfo[fMati] = PiacInfo[fMati] - 300;
format(string, sizeof(string), "Sikeresen vettйl egy colt-ot");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, "Piac", string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
}
case 3;
{
if(GetMoney(playerid) < 5000)
{
format(string, sizeof(string), "Ezt nem tudod kifizetni...");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
return 1;
}
if(PiacInfo[fMati] < 100)
{
Msg(playerid, "A gyбrnak nincs elйg alkatrйsze a fegyver цsszerakбsбhoz...");
return 1;
}
GiveMoney(playerid, -5000);
GiveWeapon(playerid, 3, 1);
Cselekves(playerid "vett valamit...");
PiacInfo[fMati] = PiacInfo[fMati] - 300;
format(string, sizeof(string), "Sikeresen vettйl egy gumibotot");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, "Piac", string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
}
case 4;
{
if(GetMoney(playerid) < 3000)
{
format(string, sizeof(string), "Ezt nem tudod kifizetni...");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
return 1;
}
if(PiacInfo[fMati] < 50)
{
Msg(playerid, "A gyбrnak nincs elйg alkatrйsze a fegyver цsszerakбsбhoz...");
return 1;
}
GiveMoney(playerid, -3000);
GiveWeapon(playerid, 4, 1);
Cselekves(playerid "vett valamit...");
PiacInfo[fMati] = PiacInfo[fMati] - 50;
format(string, sizeof(string), "Sikeresen vettйl egy kйst");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, "Piac", string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
}
case 5;
{
if(GetMoney(playerid) < 5000)
{
format(string, sizeof(string), "Ezt nem tudod kifizetni...");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
return 1;
}
if(PiacInfo[fMati] < 100)
{
Msg(playerid, "A gyбrnak nincs elйg alkatrйsze a fegyver цsszerakбsбhoz...");
return 1;
}
GiveMoney(playerid, -5000);
GiveWeapon(playerid, 5, 1);
Cselekves(playerid "vett valamit...");
PiacInfo[fMati] = PiacInfo[fMati] - 100;
format(string, sizeof(string), "Sikeresen vettйl egy baseball ьtőt");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, "Piac", string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
}
}
}


Re: Dialog problems - Max_Coldheart - 22.12.2011

Any errors? and please put the code between [pawn] & [/pawn] tags.


Re: Dialog problems - Edvin - 22.12.2011

Put the errors here!


Re: Dialog problems - Thresholdold - 22.12.2011

Are you missing a ',' in the Action(playerid, "...") ??

pawn Код:
Cselekves(playerid "...")
should be
pawn Код:
Cselekves(playerid, "...")
right?


Re: Dialog problems - FireKill - 22.12.2011

yes, it is also error, but i have more, but the pawnscite only show these errors:

>C:\BajaRPG\pawno\pawncc.exe "C:\baja03c\BajaRPG\gamemodes\BajaRPG.pwn"
>Exit code: -1073741819 Time: 1.991


Re: Dialog problems - Thresholdold - 22.12.2011

Quote:
Originally Posted by FireKill
Посмотреть сообщение
yes, it is also error, but i have more, but the pawnscite only show these errors:

>C:\BajaRPG\pawno\pawncc.exe "C:\baja03c\BajaRPG\gamemodes\BajaRPG.pwn"
>Exit code: -1073741819 Time: 1.991
Upload your whole script to pastebin and send me the link, I will fix it for you.