SA-MP Forums Archive
Problem with a /rules 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 with a /rules dialog. (/showthread.php?tid=485597)



Problem with a /rules dialog. - K9IsGodly - 04.01.2014

I don't understand why I get these errors:
Код:
C:\Users\Nolan\Desktop\Scripting Stuff\Sa-Mp Pawn\Pawn Scripting\pawno\Roleplayscript.pwn(524) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Nolan\Desktop\Scripting Stuff\Sa-Mp Pawn\Pawn Scripting\pawno\Roleplayscript.pwn(524) : warning 215: expression has no effect
C:\Users\Nolan\Desktop\Scripting Stuff\Sa-Mp Pawn\Pawn Scripting\pawno\Roleplayscript.pwn(524) : error 001: expected token: ";", but found "-string-"
C:\Users\Nolan\Desktop\Scripting Stuff\Sa-Mp Pawn\Pawn Scripting\pawno\Roleplayscript.pwn(524) : warning 215: expression has no effect
C:\Users\Nolan\Desktop\Scripting Stuff\Sa-Mp Pawn\Pawn Scripting\pawno\Roleplayscript.pwn(524) : warning 215: expression has no effect
C:\Users\Nolan\Desktop\Scripting Stuff\Sa-Mp Pawn\Pawn Scripting\pawno\Roleplayscript.pwn(524) : error 001: expected token: ";", but found ")"
C:\Users\Nolan\Desktop\Scripting Stuff\Sa-Mp Pawn\Pawn Scripting\pawno\Roleplayscript.pwn(524) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
When my code looks fine to me:
Код:
CMD:rules(playerid,params[])
{
	new pDialog[512];
    strcat(pDialog, ""COLOR_BLUE"Welcome to Chicago Streets Roleplay!\n", sizeof(pDialog));
    strcat(pDialog, ""COLOR_WHITE"Here are some basic rules you should abide by:\n", sizeof(pDialog));
    strcat(pDialog, ""COLOR_GREEN"1. "COLOR_WHITE"You are not allowed to spam, you will be kicked.\n", sizeof(pDialog));
    strcat(pDialog, ""COLOR_GREEN"2. "COLOR_WHITE"You are not allowed to advertise other servers, you will be banned.\n", sizeof(pDialog));
    strcat(pDialog, ""COLOR_GREEN"3. "COLOR_WHITE"You are not allowed to cheat/hack, you will be banned.\n", sizeof(pDialog));
    strcat(pDialog, ""COLOR_GREEN"4. "COLOR_WHITE"You are not allowed to spawnkill, you will be prisoned.\n", sizeof(pDialog));
    strcat(pDialog, ""COLOR_GREEN"5. "COLOR_WHITE"You are not allowed to exploit bugs, you will be banned based on the severity.\n", sizeof(pDialog));
    strcat(pDialog, ""COLOR_GREEN"6. "COLOR_WHITE"You are not allowed to beg for admin. We hand pick admins.\n", sizeof(pDialog));
    strcat(pDialog, ""COLOR_GREEN"7. "COLOR_WHITE"You are not allowed to MG, KOS, DM, Car Ram, Car Park, PG, etc.\n", sizeof(pDialog));
    strcat(pDialog, ""COLOR_GREEN"8. "COLOR_WHITE"For more information on terms, please type /terms and read up.\n", sizeof(pDialog));
    ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, ""COLOR_BLUE"Chicago Streets Roleplay Rules:", pDialog, "OK", "Cancel");
    return 1;
}



Re: Problem with a /rules dialog. - K9IsGodly - 04.01.2014

Anyone know why this is happening?


Re: Problem with a /rules dialog. - K9IsGodly - 04.01.2014

I've had a similar issue like this, I just had to delete the colors. But in this situation I really want the colors, so is there any solution that doesn't involve me deleting the colors?


Re: Problem with a /rules dialog. - Passout - 04.01.2014

which line is 524


Re: Problem with a /rules dialog. - K9IsGodly - 04.01.2014

Код:
 strcat(pDialog, ""COLOR_BLUE"Welcome to Chicago Streets Roleplay!\n", sizeof(pDialog));
That's 524


Re: Problem with a /rules dialog. - Seif- - 04.01.2014

In SCM, you need to use the format {RRGGBB} for colors, not 0xRRGGBBAA.


Re: Problem with a /rules dialog. - K9IsGodly - 04.01.2014

Just had my friend help me and it works now.


Quote:

In SCM, you need to use the format {RRGGBB} for colors, not 0xRRGGBBAA.

And this was the issue.