icon315
Member
I was recently trying to edit my script and i came across a problem when checking for "new events". It seems that when using substring() that if the phrase that you are looking for is not present then it aborts the script. i think that instead of aborting it should just return false.
Here is what i would do then:
Here is what i would do then:
PHP:
string newm = visit_url("messages.php");
if ( substring ( newm, (last_index_of ( newm, "<span style=\"color:blue;\">New!")), (index_of ( newm, "</td><td class=small><b>From" ))) == true)
write ("<br><br>"+ substring ( newm, (last_index_of ( newm, "<span style=\"color:blue;\">New!")), (index_of ( newm, "</td><td class=small><b>From" )))+"</div>");