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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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