Problem with a /rules dialog.
#1

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;
}
Reply
#2

Anyone know why this is happening?
Reply
#3

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?
Reply
#4

which line is 524
Reply
#5

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

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)