SA-MP Forums Archive
Problem in Dialog - 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: Problem in Dialog (/showthread.php?tid=521039)



Problem in Dialog - Team_PRO - 21.06.2014

If possible change it To ZCMD

pawn Код:
if (strcmp("/teles", cmdtext, true, 10) == 0)
{
    strcat(str, ""white"The FunGaming Stunt|Freeroam Teleports\n\n");
    strcat(str, ""red"Deathmatches:\n");
    strcat(str, ""yellow"/minigun, /grovedm, /rldm, /moltdm\n\n");
    strcat(str, ""red"Jumps:\n");
    strcat(str, ""yellow"/jump <1 - 7>, /longjump\n\n");
    strcat(str, ""red"Stunts:\n");
    strcat(str, ""yellow"/lsa, /sfpark, /aa, /chilliad, /lva, /sfa, /skatepark\n\n");
    strcat(str, ""red"NRG:\n");
    strcat(str, ""yellow"/nrg1\n\n");
    strcat(str, ""red"Cities:\n");
    strcat(str, ""yellow"/ls, /sf, /lv\n\n");
    strcat(str, ""red"Races:\n");
    strcat(str, ""yellow"/drift, /driftcircle, /drag\n\n");
    strcat(str, ""red"Fun:\n");
    strcat(str, ""yellow"/relaxelevator, /club, /loop\n\n");
    strcat(str, ""red"Parkour:\n");
    strcat(str, ""yellow"/parkour, /parkour2, /parkourcity, /parkourtower");
    ShowPlayerDialog(playerid, DIALOG_TELEPORT, DIALOG_STYLE_MSGBOX, ""white"Teleports", str, "Close", "");
    return 1;
}
pawn Код:
C:\Users\Matt\Desktop\SAMP\FG.pwn(22945) : error 010: invalid function or declaration
C:\Users\Matt\Desktop\SAMP\FG.pwn(22965) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.



Re: Problem in Dialog - RenovanZ - 21.06.2014

How about showing us where is the line 22945?


AW: Problem in Dialog - rospar - 21.06.2014

can you mark the error lines ?




Код:
CMD:teles(playerid)
{
    strcat(str, ""#white"The FunGaming Stunt|Freeroam Teleports\n\n");
    strcat(str, ""#red"Deathmatches:\n");
    strcat(str, ""#yellow"/minigun, /grovedm, /rldm, /moltdm\n\n");
    strcat(str, ""#red"Jumps:\n");
    strcat(str, ""#yellow"/jump <1 - 7>, /longjump\n\n");
    strcat(str, ""#red"Stunts:\n");
    strcat(str, ""#yellow"/lsa, /sfpark, /aa, /chilliad, /lva, /sfa, /skatepark\n\n");
    strcat(str, ""#red"NRG:\n");
    strcat(str, ""#yellow"/nrg1\n\n");
    strcat(str, ""#red"Cities:\n");
    strcat(str, ""#yellow"/ls, /sf, /lv\n\n");
    strcat(str, ""#red"Races:\n");
    strcat(str, ""#yellow"/drift, /driftcircle, /drag\n\n");
    strcat(str, ""#red"Fun:\n");
    strcat(str, ""#yellow"/relaxelevator, /club, /loop\n\n");
    strcat(str, ""#red"Parkour:\n");
    strcat(str, ""#yellow"/parkour, /parkour2, /parkourcity, /parkourtower");
    ShowPlayerDialog(playerid, DIALOG_TELEPORT, DIALOG_STYLE_MSGBOX, ""#white"Teleports", str, "Close", "");
    return 1;
}



Re: Problem in Dialog - Team_PRO - 21.06.2014

Quote:
Originally Posted by RenovanZ
Посмотреть сообщение
How about showing us where is the line 22945?
line 22945
PHP код:
if (strcmp("/yourcommand"cmdtexttrue10) == 0
line 65
PHP код:
return 1



Re: Problem in Dialog - Team_PRO - 21.06.2014

nothing works


AW: Problem in Dialog - rospar - 21.06.2014

have you try my command ?
i have no error/warning if i compile it.

and what wont works ?


Re: Problem in Dialog - Sojo12 - 21.06.2014

Team_Pro make sure that you defined your string as
Код:
new str[258];



Re: Problem in Dialog - KayJ - 21.06.2014

Use
pawn Код:
new str[ 706 ];
and if not works
pawn Код:
new str[ 128 ];
under
pawn Код:
if (strcmp("/teles", cmdtext, true, 10) == 0)
{
If using zcmd
pawn Код:
CMD:teles(playerid,params[])
{
     new str[ 706 ];
// else
     return 1;
}



Re: Problem in Dialog - Sojo12 - 21.06.2014

@Sturt Using heavy strings might slow the server down or freeze it.


Re: Problem in Dialog - KayJ - 21.06.2014

Quote:
Originally Posted by Sojo12
Посмотреть сообщение
@Sturt Using heavy strings might slow the server down or freeze it.
EDIT:
Quote:
Originally Posted by SturtIndia
Посмотреть сообщение
Use
pawn Код:
new str[ 706 ];
under
pawn Код:
if (strcmp("/teles", cmdtext, true, 10) == 0)
{
If using zcmd
pawn Код:
CMD:teles(playerid,params[])
{
     new str[ 128 ];
// else
     return 1;
}