Jump to content
  • 0
Zirius

if (.@string$) fails, any alternative?

Question

Hello! seems like, only integer variables can be used with if() exist. How about strings?

 

and how do you use strlen()? always getting unmatched brackets.

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hello! seems like, only integer variables can be used with if() exist. How about strings?

 

if(.@string$ != "") <this will be run for empty strings>

 

 

and how do you use strlen()? always getting unmatched brackets.

 

 

strlen() script command doesn't exist. I assume you mean getstrlen().

 

It's used like this:

getstrlen("mystring"); // For fixed stringsgetstrlen(.@my_string_var$); // For strings in variables//You can even mix them up:getstrlen("Hello " + strcharinfo(0));

 

Just make sure you close all the brackets you open ;)

Share this post


Link to post
Share on other sites
  • 0

Sorry, I thought it works, since I observe most PHP functions exist at Hercules. LOL.

to be specific, they are not php functions but standard functions for most languages..

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.