SA-MP Forums Archive
[HELP] What's wrong with this code? 'bout a message box - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] What's wrong with this code? 'bout a message box (/showthread.php?tid=143168)



[HELP] What's wrong with this code? 'bout a message box - WThieves - 21.04.2010

I personally think nothing's wrong but i think pawn overdrives and makes fake errors becouse in an fs it works
pawn Код:
if(strcmp(cmd, "/rules", true) == 0)
    {
    ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Do you accept our rules?","1 We want you to behave like in real life.\n2 Talk normally or you can get kicked/banned.\n3 Cheating or bug abusing results in a ban, also try /abusehelp\n4 Respect eachother and respect the admins, also try /abusehelp\n5 Spawnkilling and driveover kills aren't allowed.\n6 Use English or Dutch in any the mainchat.\n7 Advertising is allowed but if you're advertising a bad site it's a ban.\nFollow this rules and nothing will happen to you.","Accept","Decline");
        return 1;
    }



Re: [HELP] What's wrong with this code? 'bout a message box - playbox12 - 21.04.2010

Quote:
Originally Posted by WThieves
I personally think nothing's wrong but i think pawn overdrives and makes fake errors becouse in an fs it works
pawn Код:
if(strcmp(cmd, "/rules", true) == 0)
    {
    ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Do you accept our rules?","1 We want you to behave like in real life.\n2 Talk normally or you can get kicked/banned.\n3 Cheating or bug abusing results in a ban, also try /abusehelp\n4 Respect eachother and respect the admins, also try /abusehelp\n5 Spawnkilling and driveover kills aren't allowed.\n6 Use English or Dutch in any the mainchat.\n7 Advertising is allowed but if you're advertising a bad site it's a ban.\nFollow this rules and nothing will happen to you.","Accept","Decline");
        return 1;
    }
What errors do you get, post the errors plus the line


Re: [HELP] What's wrong with this code? 'bout a message box - WThieves - 21.04.2010

pawn Код:
this is 22467    if(strcmp(cmd, "/rules", true) == 0)
    this is 22468   {
    this is 22469    ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Do you accept our rules?","1 We want you to behave like in real life.\n2 Talk normally or you can get kicked/banned.\n3 Cheating or bug abusing results in a ban, also try /abusehelp\n4 Respect eachother and respect the admins, also try /abusehelp\n5 Spawnkilling and driveover kills aren't allowed.\n6 Use English or Dutch in any the mainchat.\n7 Advertising is allowed but if you're advertising a bad site it's a ban.\nFollow this rules and nothing will happen to you.","Accept","Decline");
        return 1;
    }
gamemodes\****.pwn(2246 : error 075: input line too long (after substitutions)
gamemodes\****.pwn(22469) : error 037: invalid string (possibly non-terminated string)
gamemodes\****.pwn(22469) : warning 215: expression has no effect
gamemodes\****.pwn(22469) : error 001: expected token: ";", but found "-identifier-"
gamemodes\****.pwn(22469) : error 017: undefined symbol "We"
gamemodes\****.pwn(22469) : fatal error 107: too many error messages on one line


Re: [HELP] What's wrong with this code? 'bout a message box - WThieves - 21.04.2010

please help me



Re: [HELP] What's wrong with this code? 'bout a message box - RyDeR` - 21.04.2010

Use '\' when your strings getting large..

Код:
if(!strcmp(cmdtext, "/rules", true))
{
    ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "Do you accept our rules?",
	"\
	1 We want you to behave like in real life.\n\
	2 Talk normally or you can get kicked/banned.\n\
	3 Cheating or bug abusing results in a ban, also try /abusehelp\n\
	4 Respect eachother and respect the admins, also try /abusehelp\n\
	5 Spawnkilling and driveover kills aren't allowed.\n\
	6 Use English or Dutch in any the mainchat.\n\
	7 Advertising is allowed but if you're advertising a bad site it's a ban.\n\
	Follow this rules and nothing will happen to you.", "Accept", "Decline");
	return 1;
}
Works fine for me.
(Learn to indentitate your codes)


Re: [HELP] What's wrong with this code? 'bout a message box - WThieves - 21.04.2010

Quote:
Originally Posted by » RyDeR «
Use '\' when your strings getting large..

Код:
if(!strcmp(cmdtext, "/rules", true))
{
    ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "Do you accept our rules?",
	"\
	1 We want you to behave like in real life.\n\
	2 Talk normally or you can get kicked/banned.\n\
	3 Cheating or bug abusing results in a ban, also try /abusehelp\n\
	4 Respect eachother and respect the admins, also try /abusehelp\n\
	5 Spawnkilling and driveover kills aren't allowed.\n\
	6 Use English or Dutch in any the mainchat.\n\
	7 Advertising is allowed but if you're advertising a bad site it's a ban.\n\
	Follow this rules and nothing will happen to you.", "Accept", "Decline");
	return 1;
}
Works fine for me.
(Learn to indentitate your codes)
I've been using pawno for years but never knew this thanks man you're a lifesaver!