![]() |
replacetext()
I tried Tig's replacetext, but I couldn't get it to work, so I had to create my own. I thought I'd post it here in case anyone wanted to use it.
PHP Code:
temp.test = replacetext("Hello\n \"world how\"\n\n are you?","\n",","); will return Hello, "world how",, are you?(sorry I stole your thing, Tig!) I don't know how efficient it is, but I got it working so I was happy with it. |
i don't get it =o
|
Quote:
|
Quote:
PHP Code:
|
Quote:
|
Great job Dusty, I don't really like my replacetext() function anyways. This is probably much better.
|
ooooh coool =D
|
Good job. :)
|
Just what I needed, cheers :D
|
I cannot for the life of me get this to work serverside. I was trying to use it to replace text in a .gmap file. If I trigger serverside -> clientside ->serverside it works but it lags the client for a moment.
PHP Code:
|
loadlines will return an array, I believe, which is the reason what you are doing is not working. You'd need to do something like...
PHP Code:
|
I couldn't get the shared.replacetext to work serverside but it would work clientside just fine without looping through it. I'd just trigger back and fourth but it causes to much lag renaming a 30 by 30 gmap and freezes the client for like 2 seconds.
|
NPC-server probably doesn't have write-rights to the file. Also, have you debugged any? Made sure testload is actually returning anything, to make sure it's not the replacetext? Do some echoes and stuff first.
|
Oh I fixed it by doing what you said and I went to let you know but the forums went down again.
|
shared.replacetext() will not work serverside because it is a part of the clientside function pack; this is a weapon added to players when they log in and pass through the login server, but there is no way for the serverside portion of the script to be carried across servers too.
|
| All times are GMT +2. The time now is 11:35 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.