AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Again input line too long error (https://forums.alliedmods.net/showthread.php?t=162706)

bibu 07-22-2011 01:12

Again input line too long error
 
What's wrong here, I've tried to split the lines like it has been said in several topics, but it didn't help:

PHP Code:

        const SIZE 2048
        
new msg[SIZE+1], len
        
        len 
formatex(msg[len], SIZE 1"<html>\
        <body bgcolor=^"
#2b2b2b^">\
        
<p style=^"text-align: center;^">\
        <
span style=^"color: #3399ff; \
        font-family: 'trebuchet ms', geneva;^"
>\
        <
strong>\<img src=^"http://mynet.net/cs.png^" \
        
alt="" width=^"403^" height=^"51^" />\
        <
h1>%s</h1><table border=^"1^" \
        
style=^"font-family: 'trebuchet ms'; font-size: 10px;^">\
        <
tr><td><b>Rank</b></td><td><b>Name</b></td>\
        <
td><b>Total Score</b>\
        </
td><td>\
        <
b>Zombies Killed</b>\
        </
td>\
        <
td>\
        <
b>\
        
Nemesis's Killed</b>\
        </td><td><b>Survivor: Zombies Killed</b>\
        </td><td><b>Knife: Zombies Killed</b>\
        </td><td><b>Human'
s Infected</b></td><td>\
        <
b>NemesisHuman's Killed</b>\
        </td><td><b>Survivor'
s Killed</b>\
        </
td><td><b>Human's Killed</b></td></tr>", szTitle) 


fysiks 07-22-2011 02:11

Re: Again input line too long error
 
format sections at a time.

bibu 07-22-2011 06:50

Re: Again input line too long error
 
How?

Exolent[jNr] 07-22-2011 09:12

Re: Again input line too long error
 
Quote:

Originally Posted by bibu (Post 1515931)
How?

Multiple format statements containing pieces of it.

Hunter-Digital 07-22-2011 11:08

Re: Again input line too long error
 
Just to be sure you're not gonna use format() with back copy, I'll show you the method:

Code:

new msg[2048]
new len = 0

len += formatex(msg[len], charsmax(msg) - len, "<html>")
len += formatex(msg[len], charsmax(msg) - len, "<head></head>")
len += formatex(msg[len], charsmax(msg) - len, "<body>%s</body>", "wtf")
len += formatex(msg[len], charsmax(msg) - len, "</html>")

Still, I think add() could work instead of formatex() aswell... but I never used it =)

bibu 07-22-2011 12:28

Re: Again input line too long error
 
Quote:

Error: Expected token: ",", but found "-string-" on third line.
Has it todo with the html code?

PHP Code:

        len += formatex(msg[len], charsmax(msg) - len"<html><body bgcolor=^"#2b2b2b^"><p style=^"text-align: center;^">")
        
len += formatex(msg[len], charsmax(msg) - len"<span style=^"color#3399ff; font-family: 'trebuchet ms', geneva;^"><strong>")
        
len += formatex(msg[len], charsmax(msg) - len"<img src=^"http://mynet.net/cs.png^" alt="" width=^"403^" height=^"51^" />")
        
len += formatex(msg[len], charsmax(msg) - len"<h1>%s</h1><table border=^"1^"style=^"font-family'trebuchet ms'font-size10px;^">"szTitle)
        
len += formatex(msg[len], charsmax(msg) - len"<tr><td><b>Rank</b></td><td>")
        
len += formatex(msg[len], charsmax(msg) - len"<b>Name</b></td>    <td><b>Total Score</b></td>")
        
len += formatex(msg[len], charsmax(msg) - len"<td><b>Zombies Killed</b></td><td><b>Nemesis's Killed</b></td>")
        
len += formatex(msg[len], charsmax(msg) - len"<td><b>Survivor: Zombies Killed</b></td><td><b>Knife: Zombies Killed</b></td>")
        
len += formatex(msg[len], charsmax(msg) - len"<td><b>Human's Infected</b></td><td><b>Nemesis: Human's Killed</b></td>")
        
len += formatex(msg[len], charsmax(msg) - len"<td><b>Survivor's Killed</b></td>")
        
len += formatex(msg[len], charsmax(msg) - len"<td><b>Human's Killed</b></td></tr>"


Emp` 07-22-2011 13:25

Re: Again input line too long error
 
Quote:

Originally Posted by bibu (Post 1516107)
PHP Code:

alt="" 



bibu 07-22-2011 13:30

Re: Again input line too long error
 
After those fixes, the plugin has now an infinite loop for the compilation. It doesn't finish at all.

SnoW 07-22-2011 13:55

Re: Again input line too long error
 
Quote:

Originally Posted by bibu (Post 1516133)
After those fixes, the plugin has now an infinite loop for the compilation. It doesn't finish at all.

Now that there is not even an error it is really easy for us to tell what is wrong without you showing the source code.

bibu 07-22-2011 14:48

Re: Again input line too long error
 
How I said, it happend after I edited to the one from post 6.


All times are GMT -4. The time now is 01:00.

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