Jump to content
Poison

Strings in switch case statements

Recommended Posts

that has been suggested when there were only rA, but it got rejected, can't remember why, lets wait for devs :)

Share this post


Link to post
Share on other sites

I can't see why not to implement this in our script engine, but I'm not so sure of what are the real implications of such modification performance/resource-wise...

Share this post


Link to post
Share on other sites

dont see the point or neccessarity of this.

 

i more prefer a switchcase with enums if i realy need words on the spots. but strings.... this doesnt feel correct.

Share this post


Link to post
Share on other sites

dont see the point or neccessarity of this.

 

i more prefer a switchcase with enums if i realy need words on the spots. but strings.... this doesnt feel correct.

Source supports enums, what about Scripts? scripts only support numbered switch cases(and constants)

setting up constants for scripts is not good(As far as I am concerned).[Constants also don't support strings(For Scripting)]

Edited by Dastgir Pojee

Share this post


Link to post
Share on other sites

It can maybe wrong,

 

but if a feature is so hugh, that it needs those advanced technologies, should it be a script?

i think if something is so hugh (and i would count the new bg system to this) it should not be a script, it should be a map-server logic.

 

Greetings

Tepoo

Share this post


Link to post
Share on other sites

It can maybe wrong,

 

but if a feature is so hugh, that it needs those advanced technologies, should it be a script?

i think if something is so hugh (and i would count the new bg system to this) it should not be a script, it should be a map-server logic.

 

Greetings

Tepoo

Maybe you misunderstood my words, Its definately a source modification but it is used with script like for example

OnPCTalk:switch (strcharinfo(0)){case "ItsME"://Do somethingbreak;case "ItsNotME"://Do somethingbreak;default://Do somethingbreak;}

(Just a example....)

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
Reply to this topic...

×   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.