AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   This is bugging me... (https://forums.alliedmods.net/showthread.php?t=12120)

hellraser 04-05-2005 15:06

This is bugging me...
 
Hey all,sup ?

I need some help here....
I'm using this code to display a short motd:
Code:

...
new len = 1300
new buffer[1301]
new n = 0

n += copy( buffer[n],len-n,"<p align=^"center^"><font face=^"Verdana^"><span style=^"font-size:8pt;^">%s vs. %s
</span></font></p>",team_1,team_2)
...

And when compiling i get the following error:
Quote:

warning 202: number of arguments does not match definition
team_1 & team_2 are defined...

I'm sure it's something easy i didn't think of and i can't figure it out so if someone would mind helping :))

Thx guys!

xeroblood 04-05-2005 16:23

use format() not copy()

Just change the function name, the syntax looks fine..

hellraser 04-05-2005 16:45

Thx m8 works great ;)

hellraser 04-07-2005 15:26

hey again i modified the html code to this

Code:

n += format( buffer[n],len-n,"<td width=^"433^" colspan=^"2^"><span style=^"font-size:22pt;^"><font face=^"Verdana^" color=^"#FFCC00^">%s</font></span><font face=^"Verdana^"><span style=^"font-size:22pt;^"> </span><span style=^"font-size:14pt;^">vs.</span><span style=^"font-size:22pt;^"> </span></font><span style=^"font-size:22pt;^"><font face=^"Verdana^" color=^"#FFCC00^">%s</font></span><font face=^"Verdana^"><span style=^"font-size:22pt;^">
</span></font></td>",team_1,team_2)

But now i get the following error:
Quote:

source/xtreme.sma(1330) : error 075: input line too long (after substitutions)
I tried modifying
Code:

                new len = 1300
                new buffer[1301]

to a value like 2048 but didn't change anything...

Please help! Thanks


All times are GMT -4. The time now is 09:57.

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