[Solved] Function argument gets overwritten...
I'm having a problem with a function argument getting overwritten by another value.
The problem: ImportantBlaat[] becomes the content of Text[]; When I call the function, ImportantBlaat[] is equal to Text[]. Maybe when Text[] is changed with read_file(), ImportantBlaat[] will be changed again so it becomes equal to Text[] again? Actually, this is what's happening. The test plugin: Code:
Contents of blaat.txt: Code:
blaatCode:
blaatCode:
This is REALLY important! |
Text is a global array which passed to the function by reference so inside function ImportantBlaat and Text is the same array.
|
Thank you for figuring out ^^.
|
Next time use copy() instead of format() for your situtation ;)
|
Quote:
|
| All times are GMT -4. The time now is 05:03. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.