Odd compiler error...
#1

I have this piece of code here:

pawn Code:
timer SendRegistrationEmail[3000](playerid)
{
    new szString[750];
    format(szString, sizeof(szString), "Hello there,<p>This email is to inform you that you have registered an account at %s (IP: %s), using the username %s.</p><p>We have recorded your IP address as %s and auto-login is not currently enabled. To enable it, please go in-game and do the command /accountsettings.</p><p><p>Please do not respond to this email, as it will not be sent to anyone.</p></p><p>Best Regards,</p><p>IG:RP Management</p>", SERVNAME, returnServerStringVar("bind"), GetName(playerid), returnIP(playerid));
    SendMail(pStats[playerid][EP_EMAILADDR], "donotreply@server.inimical-gaming.com", "IG:RP Team", "Greetings From The IG:RP Team", szString);
}
I am receiving the following error:

Code:
C:\Users\Piccoli\Desktop\SA-MP 0.3d\gamemodes\IGRP.pwn(831) : error 075: input line too long (after substitutions)
Now, this happens only when the code above is commented out- if it isn't, the compiler crashes.

Line 831 is this one:

pawn Code:
new szString[750];
Does anyone know why such an error would appear on that line?
Reply
#2

Put a space in the middle of that long format line somewhere. It pretty much is saying your line is huge please start a new line for this piece of code. I experienced this with working with MySQL querys.
Reply
#3

Quote:
Originally Posted by Steven82
View Post
Put a space in the middle of that long format line somewhere. It pretty much is saying your line is huge please start a new line for this piece of code. I experienced this with working with MySQL querys.
I removed a chunk of the text and it's working fine now, that's weird though because my saveCharacter() function has MUCH larger strings...
Reply
#4

Quote:
Originally Posted by RealCop228
View Post
I removed a chunk of the text and it's working fine now, that's weird though because my saveCharacter() function has MUCH larger strings...
Yeah i noticed that for my functions too. One set of strings are bigger than the other and then only one line will be displaying that error? It's weird...lol.
Reply
#5

It has to do with long strings. You can concatenate strings to work around it. I think it has to do with compiler limitations.
Reply
#6

Use strcat. I had same problem with Dialogs, strcat() fixes the problem .

HTML Code:
<p><p>Please do not respond to this email, as it will not be sent to anyone.</p></p>
<br/><p></p> would do :p
Reply
#7

Here is what I found when I had the same error.

Quote:
Originally Posted by HyperZ
On top of ur script:
pawn Code:
new LongDialog [ 1024 ];
OnGameModeInit/OnFilterScriptInit:
pawn Code:
SetUpMyText();
Command:
pawn Code:
ShowPlayerDialog(playerid, 555555, DIALOG_STYLE_MSGBOX,"Dialog Title",LongDialog, "button 1", "button 2");
Somewhere in ur script
pawn Code:
SetUpMyText()
{
    LongDialog = "Bla bla bal\n";
    strcat(LongDialog, "Bla bla bal\n");
    strcat(LongDialog, "Bla bla bal\n");
    strcat(LongDialog, "Bla bla bal\n");
    strcat(LongDialog, "Bla bla bal\n");
    return 1;
)
Reply
#8

It seems to be working now guys, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)