Raised This Month: $12 Target: $400
 3% 

#define MAX_SIZE 1012


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
moty_p
Member
Join Date: Jul 2008
Old 07-06-2010 , 17:48   #define MAX_SIZE 1012
Reply With Quote #1

why the max size can be biger in 1012?
how can i read biger files? (7KB)
moty_p is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 07-06-2010 , 20:37   Re: #define MAX_SIZE 1012
Reply With Quote #2

What are you talking about. Where is that defined?
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 07-06-2010 , 23:05   Re: #define MAX_SIZE 1012
Reply With Quote #3

Doesn't exist something known as "#define MAX_SIZE 1012", that just a defines called MAX_SIZE with value 1012 defined for the author of the plugin... you know what is a define in pawn languages?

Also, you should add more description cuz i really don't understand what you want to do... biger file? for what? i don't know what are you talking about.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
moty_p
Member
Join Date: Jul 2008
Old 07-07-2010 , 02:54   Re: #define MAX_SIZE 1012
Reply With Quote #4

this is my code:

#define MAX_SIZE 1012

new g_Text[MAX_SIZE]
new gamemp[34]

public Read_MpGame()
{
new i_File, s_File[128], Len, i
get_configsdir(s_File, charsmax(s_File))
format(s_File, charsmax(s_File), "%s/gamemp.txt", s_File)
i_File = fopen(s_File, "r")
fgets(i_File, g_Text, MAX_SIZE)
fclose(i_File)
md5_file(s_File, gamemp)
Len = strlen(gamemp)
for (i = 4; i < Len-1; i++) gamemp[i] = 0
}
this is work if the MAX_SIZE is not biger from 1012 and i need to work wiht 5000
if i change the line
#define MAX_SIZE 1012
to
#define MAX_SIZE 5000
is not work
moty_p is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 07-07-2010 , 13:10   Re: #define MAX_SIZE 1012
Reply With Quote #5

You're only getting the first line.
Code:
    while(!feof(i_File))         fgets(i_File, g_Text, MAX_SIZE)
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
pankiller6
Member
Join Date: May 2009
Old 07-07-2010 , 18:17   Re: #define MAX_SIZE 1012
Reply With Quote #6

I have the same problem, i need more than 1kb
pankiller6 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-07-2010 , 18:46   Re: #define MAX_SIZE 1012
Reply With Quote #7

Quote:
Originally Posted by Drak View Post
You're only getting the first line.
Code:
    while(!feof(i_File))         fgets(i_File, g_Text, MAX_SIZE)
Clarification:
fgets() will only get a single line at a time. So, without a while loop you are only getting the first line.
__________________
fysiks is online now
Reply


Thread Tools
Display Modes

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 00:41.


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