Thread: replacetext()
View Single Post
  #11  
Old 06-19-2009, 05:20 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
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:
temp.testload.loadlines("levels/gmap/temptest.gmap");
for (
temp.i=0;i<temp.testload.size();i++) {
  
temp.testload[i] = replacetext(temp.testload[i], "rofltest""loltest");
}
temp.testload.savelines("levels/gmap/lolxdd.gmap"0); 
Also, you can just use shared.replacetext(x,y,z) instead, as you don't need to add the function.
Reply With Quote