Reading Files
Alright, how would I set it to read shit like this:
*Hello* How are you doing? In one block of code, I am making it read whats wrapped in an asterisks, and in the other I'm reading what's not in the asterisks? |
Re: Reading Files
Code:
#include <amxmodx> |
Re: Reading Files
Do you test your code before posting? Why are you using set_task? When comparing a single char you can do x == '*'. Please don't try to help others if you don't know how to correctly do things.
This can be done more efficiently by locating the position in the string where the two asterisks are and use a copy() for the text found between the two, using position 2 - position 1 + 1 as the number of chars to copy and text[ Pos1 + 1 ] as the start position to copy. I'll show you later if you can't figure it out. |
Re: Reading Files
Quote:
|
Re: Reading Files
:O
How do you specify an exact area to copy using "copy" function? I mean, a start position and an end position. |
Re: Reading Files
copy( szDestination , NumCharsToCopy , szSource[ StartPositionInSource ] )
|
Re: Reading Files
PHP Code:
|
Re: Reading Files
Quote:
|
| All times are GMT -4. The time now is 10:26. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.