SA-MP Forums Archive
CnR problem - 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: CnR problem (/showthread.php?tid=581635)



CnR problem - Dangjai - 14.07.2015

Hello,
I am getting error on this line.
Код:
C:\Users\D3r\Desktop\PES v8\gamemodes\SEv4.pwn(7473) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\D3\Desktop\PES v8\gamemodes\SEv4.pwn(7473) : error 017: undefined symbol "Y"
C:\Users\D3\Desktop\PES v8\gamemodes\SEv4.pwn(7473) : warning 215: expression has no effect
C:\Users\D3\Desktop\PES v8\gamemodes\SEv4.pwn(7473) : warning 215: expression has no effect
C:\Users\D3\Desktop\PES v8\gamemodes\SEv4.pwn(7473) : warning 215: expression has no effect
C:\Users\D3\Desktop\PES v8\gamemodes\SEv4.pwn(7473) : error 001: expected token: ";", but found ")"
C:\Users\D3\Desktop\PES v8\gamemodes\SEv4.pwn(7473) : fatal error 107: too many error messages on one line
Line:
pawn Код:
ShowPlayerDialog( playerid , DIALOG_CnR + 2 , DIALOG_STYLE_LIST , ""NAME_S" "W"- "S"Cops Refill" , CNRRefill( ) , "(Select)" , "" );



AW: CnR problem - FSAOskar - 14.07.2015

Код:
ShowPlayerDialog( playerid , DIALOG_CnR + 2 , DIALOG_STYLE_LIST , "NAME_S", "W- S Cops Refill , CNRRefill( ) ", "(Select)" , "" );



Re: CnR problem - Virtual1ty - 14.07.2015

Are you sure that is the error line? Please show us the lines around it, the real error may be in the line immediately before.
This error usually has to do with strings not being terminated. Also, show us the definition of "CNRRefill()", "NAME_S", "W" and "S".


Re: CnR problem - Dangjai - 14.07.2015

Yes it's the real error.


Re: AW: CnR problem - Dangjai - 14.07.2015

Quote:
Originally Posted by FSAOskar
Посмотреть сообщение
Код:
ShowPlayerDialog( playerid , DIALOG_CnR + 2 , DIALOG_STYLE_LIST , "NAME_S", "W- S Cops Refill , CNRRefill( ) ", "(Select)" , "" );
Thanks worked.


Re: CnR problem - Virtual1ty - 14.07.2015

Well for me that line worked fine. And it is correct. This is a test script that I used:
PHP код:
#include <a_samp>
#define DIALOG_CnR (100)
#define NAME_S "{FF0000}The server"
#define W "{FFFFFF}"
#define S "{AE00F5}"
CNRRefill( )
{
    static const 
string[] = "Info about cops and robbers\nrefill. Ain't this sweet?";
    return 
string;
}
public 
OnFilterScriptInit()
{
    const 
playerid 0;
    
ShowPlayerDialogplayerid DIALOG_CnR DIALOG_STYLE_LIST ""NAME_S" "W"- "S"Cops Refill" CNRRefill( ) , "(Select)" "" );
    return 
1;

No errors, warnings, nothing.