Raised This Month: $ Target: $400
 0% 

[Solved] Compiler Stopped Compiling!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Baws
Veteran Member
Join Date: Oct 2012
Old 03-30-2014 , 15:09   [Solved] Compiler Stopped Compiling!
Reply With Quote #1

Whenever i try to compile this code the compiler crashes i have no idea why.
Or the code is wrong? I couldn't test as i can't even compile the code.

Code:
/* Plugin generated by AMXX-Studio */ #include < amxmodx > #include < amxmisc > #define PLUGIN "Surf Help" #define VERSION "1.0" #define AUTHOR "Baws" public plugin_init( ) {     register_plugin( PLUGIN, VERSION, AUTHOR )         register_clcmd( "say /surfhelp", "Cmd_SurfHelp" );     register_clcmd( "say_team /surfhelp", "Cmd_SurfHelp" ); } public Cmd_SurfHelp( id ) {     new Motd[ 1056 ], Len;     Len = formatex( Motd, charsmax( Motd ), "<html><head><style type=^"text/css^">body{background:#000000;margin-left:8px;margin-top:0px;}</style></head><body>" );     Len += formatex( Motd[ Len ], charsmax( Motd ) - Len, "<p style=^"text-align: center;^"><span style=^"color:cdcccb;^">This video is brought to you by <em><strong>Baws</strong></em>.</span></p>^n" );     Len += formatex( Motd[ Len ], charsmax( Motd ) - Len, "<h3 style=^"text-align: center;^"><span style=^"color:d7d5d2;^"><strong>Advanced Surfing Help Video</strong></span></h3>^n" );     Len += formatex( Motd[ Len ], charsmax( Motd ) - Len, "<p style=^"text-align: center;^"><span style=^"color:cdcccb;^">Note: Loading time depends on your internet speed.</span></p>^n" );     Len += formatex( Motd[ Len ], charsmax( Motd ) - Len, "<p style=^"text-align: center;^"><span style=^"color:cdcccb;^">Make sure to follow these steps! Or you will end up in jail.</span></p>^n" );     formatex( Motd[ Len ], charsmax( Motd ) - Len, "</body></html>" );         Len = formatex( Motd, charsmax( Motd ), "<pre><center><object type=^"application/x-shockwave-flash^" data=^"http://allied-gamers.com/player.swf^" height=^"200^" width=^"500^" quality=^"high^"><param name=^"movie^" value=^"http://allied-gamers.com/player.swf^"><param name=^"FlashVars^" value=^"backcolor=0x000000&amp;frontcolor=0xCCCCCC&amp;lightcolor=0x996600&amp;searchbar=false&amp;autostart=true&amp;repeat=never&amp;shuffle=false&amp;volume=50&amp;file=http://www.youtube.com/watch?v=opdR6MVNIE4^"></object></EMBED></OBJECT></body></pre></html>" );         show_motd( id, Motd, "Advanced Surf Help" )         return PLUGIN_HANDLED; }
__________________
Like my clean plugins and work?

Last edited by Baws; 03-30-2014 at 15:56.
Baws is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-30-2014 , 15:18   Re: Compiler Stopped Compiling!
Reply With Quote #2

It is your last formatex line that is causing it
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
minato
Senior Member
Join Date: May 2010
Location: Rosario
Old 03-30-2014 , 15:20   Re: Compiler Stopped Compiling!
Reply With Quote #3

HTML Code:
Len = formatex( Motd, charsmax( Motd ), "<pre><center><object type=^"application/x-shockwave-flash^" data=^"http://allied-gamers.com/player.swf^" height=^"200^" width=^"500^" quality=^"high^"><param name=^"movie^" value=^"http://allied-gamers.com/player.swf^"><param name=^"FlashVars^" value=^"backcolor=0x000000&amp;frontcolor=0xCCCCCC&amp;lightcolor=0x996600&amp;searchbar=false&amp;autostart=true&amp;repeat=never&amp;shuffle=false&amp;volume=50&amp;file=http://www.youtube.com/watch?v=opdR6MVNIE4^"></object></EMBED></OBJECT></body></pre></html>" );
the line is very long
__________________
minato is offline
Send a message via MSN to minato
Baws
Veteran Member
Join Date: Oct 2012
Old 03-30-2014 , 15:32   Re: Compiler Stopped Compiling!
Reply With Quote #4

Any possible way to make it shorter?

Yami, You mean last Len?
__________________
Like my clean plugins and work?
Baws is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-30-2014 , 15:32   Re: Compiler Stopped Compiling!
Reply With Quote #5

Quote:
Originally Posted by baws View Post
Any possible way to make it shorter?

Yami, You mean last Len?
You can break it up into multiple formats (exactly like you did above).
__________________
fysiks is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 03-30-2014 , 15:54   Re: Compiler Stopped Compiling!
Reply With Quote #6

Thanks it works! <3
__________________
Like my clean plugins and work?
Baws is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 03-30-2014 , 16:35   Re: [Solved] Compiler Stopped Compiling!
Reply With Quote #7

If you don't format anything you can use a simpler function, like copy() or add().
__________________
Black Rose is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 03-30-2014 , 18:07   Re: [Solved] Compiler Stopped Compiling!
Reply With Quote #8

I see.
__________________
Like my clean plugins and work?
Baws is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 03-30-2014 , 19:41   Re: [Solved] Compiler Stopped Compiling!
Reply With Quote #9

Furthermore, loading text from a file when map starts seems amazing.
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Baws
Veteran Member
Join Date: Oct 2012
Old 03-30-2014 , 21:02   Re: [Solved] Compiler Stopped Compiling!
Reply With Quote #10

Quote:
Originally Posted by claudiuhks View Post
Furthermore, loading text from a file when map starts seems amazing.
I will be not needing that as i will be doing multilingual with the plugin. But thanks anyways!
__________________
Like my clean plugins and work?

Last edited by Baws; 03-30-2014 at 21:02.
Baws 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 06:01.


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