Raised This Month: $ Target: $400
 0% 

Using new file natives


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sputnik53
Senior Member
Join Date: Jun 2005
Old 03-09-2008 , 12:15   Using new file natives
Reply With Quote #1

How do I use the new file natives to write stuff into a specific line (using the line's number)?

Last edited by Sputnik53; 03-09-2008 at 13:14.
Sputnik53 is offline
Sputnik53
Senior Member
Join Date: Jun 2005
Old 03-10-2008 , 12:57   Re: Using new file natives
Reply With Quote #2

Sorry
Sputnik53 is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 03-10-2008 , 14:41   Re: Using new file natives
Reply With Quote #3

fseek ...
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Sputnik53
Senior Member
Join Date: Jun 2005
Old 03-11-2008 , 02:54   Re: Using new file natives
Reply With Quote #4

Quote:
Originally Posted by Alka View Post
fseek ...
I tried that but I failed...
Sputnik53 is offline
Sputnik53
Senior Member
Join Date: Jun 2005
Old 03-14-2008 , 13:21   Re: Using new file natives
Reply With Quote #5

Why does this crash the whole server?
PHP Code:
static data[33]

fopen(file[id],"wt")
format(data,32,"I'm so wrong")
fseek(file[id],0,SEEK_SET)
fputs(file[id],data)
fclose(file[id]) 
Sputnik53 is offline
|PJ| Shorty
Veteran Member
Join Date: Aug 2005
Location: Bavaria, Germany
Old 03-14-2008 , 15:53   Re: Using new file natives
Reply With Quote #6

PHP Code:
static data[33]
 
new 
handler
handler
=fopen(file[id],"wt"//fopen returns a file handler to use
format(data,32,"I'm so wrong")
fseek(handler,0,SEEK_SET)
fputs(handler,data)
fclose(handler
__________________
There are only 10 types of people in the world:
Those who understand binary, and those who donīt.
|PJ| Shorty is offline
Send a message via ICQ to |PJ| Shorty Send a message via AIM to |PJ| Shorty Send a message via MSN to |PJ| Shorty Send a message via Yahoo to |PJ| Shorty Send a message via Skype™ to |PJ| Shorty
Sputnik53
Senior Member
Join Date: Jun 2005
Old 03-14-2008 , 16:30   Re: Using new file natives
Reply With Quote #7

Well, how do I set a specific line to put text to?
Sputnik53 is offline
|PJ| Shorty
Veteran Member
Join Date: Aug 2005
Location: Bavaria, Germany
Old 03-14-2008 , 17:27   Re: Using new file natives
Reply With Quote #8

http://www.amxmodx.org/funcwiki.php?go=func&id=88
__________________
There are only 10 types of people in the world:
Those who understand binary, and those who donīt.
|PJ| Shorty is offline
Send a message via ICQ to |PJ| Shorty Send a message via AIM to |PJ| Shorty Send a message via MSN to |PJ| Shorty Send a message via Yahoo to |PJ| Shorty Send a message via Skype™ to |PJ| Shorty
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-14-2008 , 17:59   Re: Using new file natives
Reply With Quote #9

he wants to use the new file natives
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Sputnik53
Senior Member
Join Date: Jun 2005
Old 03-15-2008 , 05:32   Re: Using new file natives
Reply With Quote #10

Anyone?
I've tried
PHP Code:
fseek(handler,line,SEEK_SET)
fputs(handler,data
But it doesn't work, even if I create the file myself and make sure there is that line.
Sputnik53 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 18:14.


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