Weird compiler error... "input line too long" ???
2 Attachment(s)
Check out the screenshot, I love how the line is just a {
Any ideas? I attached the entire project if you'd like to take a look Thanks, Josh |
db.inl: (line 236)
the line exceeds 512 bytes.. that's why is says 'g_DBTa...' truncated at that limit, i'd try to avoid lines longer than 512 bytes ! |
Well how can I make something that is that long smaller?
format( szQuery, 511, "CREATE TABLE `%s` (`playerid` VARCHAR(35) NOT NULL DEFAULT '', `playerip` VARCHAR(20) NOT NULL DEFAULT '', `playername` VARCHAR(35) NOT NULL DEFAULT '', `xp` INT(11) NOT NULL DEFAULT 0, `race` TINYINT(4) NOT NULL DEFAULT 0, `skill1` TINYINT(4) NOT NULL DEFAULT 0, `skill2` TINYINT(4) NOT NULL DEFAULT 0, `skill3` TINYINT(4) NOT NULL DEFAULT 0, `skill4` TINYINT(4) NOT NULL DEFAULT 0, `time` TIMESTAMP(14) NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`playerid`, `race`))", g_DBTableName ); I'd prefer not to do a ton of "adds" ??? |
You can end the string and continue it on the next line. At least in C/C++, you can:
Code:
function("hello 1234" |
yea I tried that, I got compiler errors...
"invalid string" |
Code:
function("hello 1234\[edited] |
try this
Code:
|
v3x is right though. Pawn language guide page 148:
You also use the concatenation character to cut long literal strings over multiple lines. Note that the \\" eats up all trailing white space that comes after it and leading white space on the next line. The example below prints "Hello world" with one space between the two words (because there is a space between "Hello" and the backslash): Code:
I've compiled and disassembled (using Wraith's AmxReader) a similar example and it works. (also note that the fact that AMX Mod X uses '^' as its escape character by default doesn't change the "concatenation character"). |
| All times are GMT -4. The time now is 05:02. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.