Raised This Month: $51 Target: $400
 12% 

Weird compiler error... "input line too long" ???


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 05-11-2006 , 13:41   Weird compiler error... "input line too long" ???
Reply With Quote #1

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
Attached Images
File Type: jpg compiler.jpg (755.3 KB, 259 views)
Attached Files
File Type: rar war3ft.rar (84.9 KB, 142 views)
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
KoST
Senior Member
Join Date: Jul 2005
Old 05-11-2006 , 13:55  
Reply With Quote #2

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 !
__________________
KoST is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 05-11-2006 , 15:22  
Reply With Quote #3

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" ???
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 05-11-2006 , 15:26  
Reply With Quote #4

You can end the string and continue it on the next line. At least in C/C++, you can:

Code:
function("hello 1234"
   "5678"
   "9012");
edit: sorry, turns out that you can't in pawn.
__________________
hello, i am pm
PM is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 05-11-2006 , 15:27  
Reply With Quote #5

yea I tried that, I got compiler errors...

"invalid string"
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-11-2006 , 15:28  
Reply With Quote #6

Code:
function("hello 1234\
   5678\
   9012");
maybe

[edited]
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 05-11-2006 , 15:34  
Reply With Quote #7

try this
Code:
formatex( 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%s"      , g_DBTableName      , ", `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`))"         );
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 05-11-2006 , 15:41  
Reply With Quote #8

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:
print("Hello \   world")

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").
__________________
hello, i am pm
PM is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode