View Single Post
Author Message
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 05-16-2015 , 19:07   Edit a word inside a text file
Reply With Quote #1

I've been struggling for the past hour, but with no use. I just can't understand how files work in amxx. Maybe because I'm tired.

Anyways, suppose we have a file inside amxmodx/configs/messages.txt
and the contents of messages.txt are
PHP Code:
What a nice day
Problems
Good night 
I want to change "Problems" into "No problems" then rewrite the file.

How would I do this? I tried reading the whole file as a string then using replace_all and I failed miserably.
Code snips would also be very welcome
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline