AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   array larger then 2048 byte? (https://forums.alliedmods.net/showthread.php?t=5706)

brandy 09-10-2004 10:22

array larger then 2048 byte?
 
I would like an messages box.

at the moment i use motd (show_motd)

new text[2048];
...
show_motd(id, text, "head");

but my text is larger then 2048 and i cant create an array larger 2048.

if i use new text[4096];
there is no error at compile time, but if i execute the comand i get error 4
(i think this is buffer overflow??)

how i can use show_motd with more than 2048 byte?

thx
brandy

Freecode 09-10-2004 10:34

try
Code:
#pragma dynamic 32768

EKS 09-10-2004 10:53

I think there is a hardcoded limit in how big a HL message can be. Perhaps that what you are reaching.

Freecode 09-10-2004 11:17

oh right like EKS said HL Engine has a limit on chars

brandy 09-10-2004 11:51

:(
oh

but thats very small for an message box like motd

i spend a lot of time to write this module an now ....
there is no solution

:(


thx
brandy

Freecode 09-10-2004 11:54

try adding this under includes
#pragma dynamic 32768

brandy 09-10-2004 12:28

i did

and the result is,
i get no error msg anymore

but in the motd window
i can only see the first 2048 byte

Johnny got his gun 09-10-2004 16:15

Create a temp file and send everything you want to display to it, then have a client display it, and then remove it, maybe a couple seconds later.

Anpheus 09-10-2004 18:16

Have you considered using an IFrame or referencing the MOTD as an html webpage on some webserver? That should work.

brandy 09-14-2004 07:21

@Anpheus

I generate dynamic HTML code and store it in a variable
then i use show_motd

it works like the stats plugin (/top15 or /rank cmd)

@ Johnny

Create a temp file and send everything you want to display to it -- OK
then have a client display it -- sorry i dont understand this
how can i display this file, which cmd (show_motd? this will also not work?)


thx
brandy


All times are GMT -4. The time now is 17:25.

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