Raised This Month: $ Target: $400
 0% 

array larger then 2048 byte?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
brandy
New Member
Join Date: Sep 2004
Old 09-10-2004 , 10:22   array larger then 2048 byte?
Reply With Quote #1

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
brandy is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 09-10-2004 , 10:34  
Reply With Quote #2

try
Code:
#pragma dynamic 32768
Freecode is offline
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 09-10-2004 , 10:53  
Reply With Quote #3

I think there is a hardcoded limit in how big a HL message can be. Perhaps that what you are reaching.
EKS is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 09-10-2004 , 11:17  
Reply With Quote #4

oh right like EKS said HL Engine has a limit on chars
Freecode is offline
brandy
New Member
Join Date: Sep 2004
Old 09-10-2004 , 11:51  
Reply With Quote #5


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
brandy is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 09-10-2004 , 11:54  
Reply With Quote #6

try adding this under includes
#pragma dynamic 32768
Freecode is offline
brandy
New Member
Join Date: Sep 2004
Old 09-10-2004 , 12:28  
Reply With Quote #7

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
brandy is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 09-10-2004 , 16:15  
Reply With Quote #8

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.
Johnny got his gun is offline
Anpheus
Senior Member
Join Date: Aug 2004
Old 09-10-2004 , 18:16  
Reply With Quote #9

Have you considered using an IFrame or referencing the MOTD as an html webpage on some webserver? That should work.
Anpheus is offline
brandy
New Member
Join Date: Sep 2004
Old 09-14-2004 , 07:21  
Reply With Quote #10

@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
brandy 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 17:25.


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