CoC: Unofficially Expanded Edition (v1.4.19 for CoC 1.0.2)

Ormael

Well-Known Member
Aug 27, 2015
6,631
1,786
Aah, ok. Thanks for pointing that out. Anyway: When I want to test things and/or just want to go through any TF from scratch. And hummus is a way for me to remove any trace of TFs you've undergone in this world. On the other hand: How bout adding an item or an option to Rathazul, which removes that perk rather, than hummus randomly removing it, when you want to keep it and not removing it, when you want to get rid of it.

For that reason I always keep one slot with test chara that is lvl 1 pure human PC without any TF effects on. So I can test virtualy almost any TF item from fresh (well Xianxia mod got easy and legal way to get 95% TF items as long PC will pay 3x their price ;) and with using debug that will not consuem them it just req. to buy one and then test as infinity)

PS: After the rearBodyType I plan to implement SKIN_TYPE_DRACONIC including the transitions between them and SKIN_TYPE_SCALES.
And probably some more helper-functions, like player.isDraconic(softcap = false) or player.hasLeatherWings, player.hasBatWings, player.hasDragonWings and so on. Just to get some of these ugly long if-statements shorter and a bit easier to write. Maybe I'll create a branch off my HEAD revision for that.

Mind my curiousity why you want make dragons have different skin type than scales? We got so far normal, fur, chitin (Xianxia exclusive one), scales, goo and 'undefined' skin types. I relly pondering hard on pros on getting draconic skin type.


Also about eye or arm types. Some races eyes or arms will be almsot the same looking like other race(s) so I think it not that fen or kitteh or me not wanted never add more of them but it was matter of not making 4 copies of the same arm desc that got one word changed and called as new body type. Unless you can somehow think of way to not make it all so generic (short of making each body type description super long)
 

Tempestfury

Well-Known Member
May 28, 2016
59
15
... I've spent more time modding Skyrim than actually playing the god damn game.


I need to get a good gaming computer one day and actually play through it properly, vanilla to start with, then mod it up afterwards. I admit, 'LoversLab' is new to me, and I'm not entirely sure how much I'll like sexual content in a game like Skyrim. But it could be fun to try out sometime!


Once I have enough time that is... bit busy with everything in my life currently...
 

Stadler

Well-Known Member
Jun 21, 2016
366
18
47
For that reason I always keep one slot with test chara that is lvl 1 pure human PC without any TF effects on. So I can test virtualy almost any TF item from fresh (well Xianxia mod got easy and legal way to get 95% TF items as long PC will pay 3x their price ;) and with using debug that will not consuem them it just req. to buy one and then test as infinity)

Yep, debug mode is nice for testing these things. Dragon neck and Dragon rearBody will be Ember only, after I've finished testing going back and forth with drakes heart

Mind my curiousity why you want make dragons have different skin type than scales? We got so far normal, fur, chitin (Xianxia exclusive one), scales, goo and 'undefined' skin types. I relly pondering hard on pros on getting draconic skin type.

Mainly its just fluff. On the other hand, dragon scales are described as being shield-shaped and tougher and iron-like. Then you could possibly add some features, like +5 basic defense and so on. Another thing would be the dragonScore() requiring dragon scales (== SKIN_TYPE_DRACONIC) and the lizanScore requiring reptile scales (== SKIN_TYPE_SCALES). Oh and yet another thing: I you don't want to die young you shouldn't compare a dragon with a lizard unless he can't hear you ;)

Also about eye or arm types. Some races eyes or arms will be almsot the same looking like other race(s) so I think it not that fen or kitteh or me not wanted never add more of them but it was matter of not making 4 copies of the same arm desc that got one word changed and called as new body type. Unless you can somehow think of way to not make it all so generic (short of making each body type description super long)

I didn't want to fiddle around with the salamander arm, so I've intrdouced the ARM_TYPE_DRAGON having non-red scale color and draconic scales. Maybe, I'll add a generic ARM_TYPE_PREDATOR, which could be any clawed arm independent of skin colour and type (e. g. furry, midnight-black predator arms for hellhounds).
 
Last edited by a moderator:

Ormael

Well-Known Member
Aug 27, 2015
6,631
1,786
Yep, debug mode is nice for testing these things. Dragon neck and Dragon rearBody will be Ember only, after I've finished testing going back and forth with drakes heart

Ahh I thought in the end PC would get this neck and rear TF effects too (not sure if that would possible open some worm can or not). If it jsut for her/his flavor it could be made as to change Ember appearance desc to say about long neck or rear s/he have.

Mainly its just fluff. On the other hand, dragon scales are described as being shield-shaped and tougher and iron-like. Then you could possibly add some features, like +5 basic defense and so on. Another thing would be the dragonScore() requiring dragon scales (== SKIN_TYPE_DRACONIC) and the lizanScore requiring reptile scales (== SKIN_TYPE_SCALES). Oh and yet another thing: I you don't want to die young you shouldn't compare a dragon with a lizard unless he can't hear you ;)

Yeah that would make dragon score more distinctt and...on other hand made slight tougher to mix with other races. Belive me some people loves to make hybryd race PC that got as many races stuffed in as possible. So for them scales been counted for dragon and some other scores is blessing. But then again we can't cater to all tastes at same time.

I didn't want to fiddle around with the salamander arm, so I've intrdouced the ARM_TYPE_DRAGON having non-red scale color and draconic scales. Maybe, I'll add a generic ARM_TYPE_PREDATOR, which could be any clawed arm independent of skin colour and type (e. g. furry, midnight-black predator arms for hellhounds).

Arms like otherbody parts are aside visual parts of been meantioned in desc on app screen giving points to some race score. WIth more general things like skin type that is use in more than 1 race score arms are so far mostly used for one single race score. That brings us to funny conclusion that cock types count for some races but...we not have any vagina types (code got human, sandtrap ones but they got barely any effects).
 

Stadler

Well-Known Member
Jun 21, 2016
366
18
47
Ahh I thought in the end PC would get this neck and rear TF effects too (not sure if that would possible open some worm can or not). If it jsut for her/his flavor it could be made as to change Ember appearance desc to say about long neck or rear s/he have.

Sorry, I meant: neck and rear will be from Ember's blood only in the future. So you better not destroy the egg, if you want that, too :)

Yeah that would make dragon score more distinctt and...on other hand made slight tougher to mix with other races. Belive me some people loves to make hybryd race PC that got as many races stuffed in as possible. So for them scales been counted for dragon and some other scores is blessing. But then again we can't cater to all tastes at same time.

Or you could simply lower the dragonScore() hardcap from >6 to >5 and let lizardScore() be the same with SKIN_TYPE_SCALES and SKIN_TYPE_DRACONIC. In the latter case you just have to test for both. [Edit:] Or use player.hasReptileSkin()

Arms like otherbody parts are aside visual parts of been meantioned in desc on app screen giving points to some race score. WIth more general things like skin type that is use in more than 1 race score arms are so far mostly used for one single race score. That brings us to funny conclusion that cock types count for some races but...we not have any vagina types (code got human, sandtrap ones but they got barely any effects).

ARM_TYPE_DRAGON doesn't add points to the dragonScore. That was on purpose by me, since I don't want to juggle more with the dragonScore() hard (>6) and soft cap. (>=4).

btw: I plan to rename isDragonic() to isDragon(). And I'll probably move the helper functions to a new class called PlayerHelper. Inheritance would be Player inherits from PlayerHelper and PlayerHelper inherits from Character. Reason: I want them in a separate file/class rather than bloating Player.as any more.
isDragon() and any other isRaceXYZ() will remain in Player.as since I don't want to move the racexyzScore() methods around.


Why these isRaceXYZ()-methods? Well, if you change any score-requirement, you have to change it everywhere in the code, where you check for it. If you have something, like isNaga() for example you only have to change it on one place.
 
Last edited by a moderator:

Ormael

Well-Known Member
Aug 27, 2015
6,631
1,786
Sorry, I meant: neck and rear will be from Ember's blood only in the future. So you better not destroy the egg, if you want that, too :)

So in theory it mean that only drinking real dragon blood would trigger this changes. And so IF by chance we would have another real dragon NPC (Kiha sadly only is dummy-type dragoness due to demons experiments) it would also allow this, right?

Or you could simply lower the dragonScore() hardcap from >6 to >5 and let lizardScore() be the same with SKIN_TYPE_SCALES and SKIN_TYPE_DRACONIC. In the latter case you just have to test for both. [Edit:] Or use player.hasReptileSkin()

There is possibility that you set up that some dracon traits will be negative oint for lizan score (something like that I made for harpy and shark so it won't make PC that went for siren race get points for harpy score thus it would make combine both socres with barely any work aside getting hapry+shark triats req. for been siren.

btw: I plan to rename isDragonic() to isDragon(). And I'll probably move the helper functions to a new class called PlayerHelper. Inheritance would be Player inherits from PlayerHelper and PlayerHelper inherits from Character. Reason: I want them in a separate file/class rather than bloating Player.as any more.
isDragon() and any other isRaceXYZ() will remain in Player.as since I don't want to move the racexyzScore() methods around.

As long all will work and not bork you can do it ^^


So far I fine with using player.as (at least less places I need look for thou lately I found something to look over all code - and at same time at first use of it I severy screw up Xianxia code...but it all was reverted now)
 

mayosauce

New Member
Apr 28, 2016
4
0
I'm pretty good with code. If i can get the recent source code for CoC Mod, I could help whoever does the coding. Put this bachelors in Computer Science to work!
 

Stadler

Well-Known Member
Jun 21, 2016
366
18
47
So in theory it mean that only drinking real dragon blood would trigger this changes. And so IF by chance we would have another real dragon NPC (Kiha sadly only is dummy-type dragoness due to demons experiments) it would also allow this, right?

Yes, Kiha and whatever other dragon-type character could be a possible source, too IF it is being implemented to drink blood from her, too. I simply think, that the flower shouldn't fully replace drinking blood from a real dragon.

There is possibility that you set up that some dracon traits will be negative oint for lizan score (something like that I made for harpy and shark so it won't make PC that went for siren race get points for harpy score thus it would make combine both socres with barely any work aside getting hapry+shark triats req. for been siren.

Getting a dragon neck requires player.isDraconic (will be renamed to isDragon) and player.hasDragonRear (will be renamed to hasDraconicBackSide, so its not being confused with REAR_BODY_TYPEs) to return true. The dragon REAR_BODY_TYPEs will require a finished dragon neck (length >= 24 inches). If you lose dragon features, that are reuired for that, you'll lose the neck and the rearBody-feature. Howerver: It will still be possible to be a lizan or a salamaber with a dragon neck and a dragon rear body.

As long all will work and not bork you can do it ^^


So far I fine with using player.as (at least less places I need look for thou lately I found something to look over all code - and at same time at first use of it I severy screw up Xianxia code...but it all was reverted now)

I'll test it anyway and if you don't like it you can still revert this by simply merging it with the Player-class again.


PS: Just commited my finalized dragon neck TF and I'll start work on the rearBody next. Post will be updated later.
 

Ormael

Well-Known Member
Aug 27, 2015
6,631
1,786
Yes, Kiha and whatever other dragon-type character could be a possible source, too IF it is being implemented to drink blood from her, too. I simply think, that the flower shouldn't fully replace drinking blood from a real dragon.

Aside of Ember we not have for now any real dragon npc's. Kiha is only imitation dragon so I not sure if it would count as her been true draon. Plus it will call for writing even short scene for PC drinking her blood too. Maybe thinking of making some other dragon npc would be in order to make this neck or rear effect accesable (unless we want really make PC never try to kill emger in egg stage). You know some players want to be super cruel.
 

Stadler

Well-Known Member
Jun 21, 2016
366
18
47
Aside of Ember we not have for now any real dragon npc's. Kiha is only imitation dragon so I not sure if it would count as her been true draon. Plus it will call for writing even short scene for PC drinking her blood too. Maybe thinking of making some other dragon npc would be in order to make this neck or rear effect accesable (unless we want really make PC never try to kill emger in egg stage). You know some players want to be super cruel.

Well ... their decision and their problem ^^


PS: Corrupted Ember is still an option for the future
 

Ormael

Well-Known Member
Aug 27, 2015
6,631
1,786
Well ... their decision and their problem ^^


PS: Corrupted Ember is still an option for the future

Officialy Pure and Corrupted Ember was cut down leaving current one 'tainted' version. Not much for pure/corrupted ones are written that could be found too I think. SO it really seems we won't get those two options ever :/
 

Stadler

Well-Known Member
Jun 21, 2016
366
18
47
Officialy Pure and Corrupted Ember was cut down leaving current one 'tainted' version. Not much for pure/corrupted ones are written that could be found too I think. SO it really seems we won't get those two options ever :/

Yeah, saw that looking at the code. Well, anyways: NYI doesn't mean never implemented. :) Well, personally I have no idea, how this could possibly go.


PS: I've pushed a few more updates to my patched over at GitHub. And I'm almost finished with the dragon rear body TF. TF and removal is implemented. Now I just need to write the texts for it.
PPS: Maaaaaaaaaybe I'll add EYE_TYPE_REPTILE for dragon and lizan (Requires dragon or lizan faceType). I kinda like the idea of my chara gaining lizard eyes, but implementing this without issues could be kinda tricky.
 

DarkWolf

New Member
Feb 3, 2016
3
0
jeez, i need to pay more attention to this mod, i keep on forgetting like half the games i have downloaded and then i remembered this and looked to see the most recent version and im hearing stuff about like draconic skin and such. maybe i wouldnt be so confused if i actually payed attention every once in a while.
 

AnonTheMouse

New Member
Jun 27, 2016
3
0
Alright, so at the risk of being ignored again...

It's kind of annoying when I can set up my character a certain way at creation, but when I use Hummus to reverse unwanted transformations, it also makes me shorter, or changes my skin tone, or something. Any way to get that changed so that instead of making you "average", it makes you "normal"...as in, steps closer to your created starting appearance? I wouldn't even mind if you had to pay someone to improve the item to do it!
 

Ryplinn

Well-Known Member
Jun 13, 2016
60
14
Ohh seems you got system or comp configuration I not know at all so Ryplinn advice would be much easier to do. Also remeber doing as he said that it may wipe out TuTS saves if you got any (I assume Chromebook will save form that game too in exactly the same location).


@Ryplinn is it possible to open folder local on Chromebook insted of using way you desc to clean it up (as it probably will wipe Tsui not only CoC ones saves)? I think better would be to jsut open that folder with saves and delete one file over wiping out whole folder possible cutting other stuff from it too.

I hadn't thought about TiTS saves; thanks for pointing that out.


Chromebooks are extremely locked down unless you put them in developer mode (which wipes local user data anyway), so access to local folders via the browser is effectively impossible. There may be a way to get a more granular breakdown of Flash data, but I don't know of one.
 

Sacredferro

Well-Known Member
Aug 26, 2015
510
45
Alright, so at the risk of being ignored again...

It's kind of annoying when I can set up my character a certain way at creation, but when I use Hummus to reverse unwanted transformations, it also makes me shorter, or changes my skin tone, or something. Any way to get that changed so that instead of making you "average", it makes you "normal"...as in, steps closer to your created starting appearance? I wouldn't even mind if you had to pay someone to improve the item to do it!

CoCED (The editor) is the closest thing to what you are looking for. Items don't, and likely cannot practically, work that way. They seldom work in such a custom and personalized manner because that would require thousands of different variations of the same item, all tailored to include or exclude selective changes and individual as each player. Many TF items change a broad number of things because they have to in order to minimize the need for an exponentially bloated set of "variants" for the same style of transformations. Besides, what you're asking for is essentially the same thing as a toggle to turn TF's off, which is a little redundant since most of the time, TFs can be easily avoided if one chooses to. When they cannot be avoided (which is very rare), either due to the lack of an alternative path or because you didn't know that choice gives you one, the editor can help to reverse unwanted TF's and undesired changes to your character. I don't like surprise TF's either as I like to build my character to be what I want them to be on day 1, and I will admit CoC does in some cases have events and items that change you without warning, but they are rare enough as is and I cannot think of one that is not avoidable once you learn it's there.


Also, to comment on your earlier issue, the prologue can be skipped during character creation for that reason. The fact that you go through the portal without arms is part of the game's lore. Think Terminator except that it's due to customary tradition rather than scientific reasoning (which is really odd given that franchise's historically complete disregard for factual science in the first place). At least you're not sent through naked, am I right? I'd agree that a warning in bold could be annotated to the screen asking whether you want to play the prologue or not so as to caution the player than some of his or her gear may not accompany them afterwards depending on what possessions they have on them at the time. There's not much to do in the prologue yet anyways as it's unfinished and very WIP.


Finally, to my knowledge, Essy is the one that feeds off the PC, not the other way around. Maybe I missed something in the encounter scene with her? I usually ignore her for the most part.
 
Last edited by a moderator:

Stadler

Well-Known Member
Jun 21, 2016
366
18
47
While you choose a height from 48 to 96 inches (4-8 feet) hummus crops that choice to 60 to 84 inches. See the code on GitHub here. Is this a bug or was it intended?
 
Last edited by a moderator:

Ormael

Well-Known Member
Aug 27, 2015
6,631
1,786
Yeah, saw that looking at the code. Well, anyways: NYI doesn't mean never implemented. :) Well, personally I have no idea, how this could possibly go.


PS: I've pushed a few more updates to my patched over at GitHub. And I'm almost finished with the dragon rear body TF. TF and removal is implemented. Now I just need to write the texts for it.
PPS: Maaaaaaaaaybe I'll add EYE_TYPE_REPTILE for dragon and lizan (Requires dragon or lizan faceType). I kinda like the idea of my chara gaining lizard eyes, but implementing this without issues could be kinda tricky.

Adding new body type for types like eyes or arms is easy anyway. You taking some laready existing scene to TF effect for eyes/arms/other body you want. Then or before this you creating desc of new body part, write code for it in app files. Then jsut finding TF to put it in, setting conditions and pasting text for actuly TF effect. then you go to testing. Writing for new type of body parts like necks and rear I think would be slight tougher to do.

I hadn't thought about TiTS saves; thanks for pointing that out.


Chromebooks are extremely locked down unless you put them in developer mode (which wipes local user data anyway), so access to local folders via the browser is effectively impossible. There may be a way to get a more granular breakdown of Flash data, but I don't know of one.

Ohh well looks like chromebooks are quite good in some regards and pita in others type of comps. As said never used any of them before so I not know what issues people could face with them -_-' And it kinda sucks to not been able use browser to find some file on local harddrive (err they do have some local HD or just online ones?)
 

Stadler

Well-Known Member
Jun 21, 2016
366
18
47
Ok, I'm finished with the readBodyType TF so far. Below are screens of the TF descriptions:
hairy-mane-tf.pngspiky-mane-tf.png


[Edit:] Finished updating my dragon patch post.
 
Last edited by a moderator:

Stadler

Well-Known Member
Jun 21, 2016
366
18
47
Yet another update to my dragon patch. Now with saving and loading teh dragon features :)


PS: I mentioned once, That a full grown neck + dragon tongue won't give you the opportunity to give yourself a BJ or should I say TJ, when you are a taur. Heres my reasoning:

  1. Somehow I like to be able to continue my journey and/or doing whatever in my camp without the need to masturbate or having sex with your lovers.
  2. I think, that no TF should give taurs the option to masturbate.
  3. I'm terrible, when it comes to be creative and you don't want to read any sex-scenes written by me ;)
    However: If anyone writes the respective sex scene, I probably add them to my patch ignoring point 1. and 2. :)
 
Last edited by a moderator:

AnonTheMouse

New Member
Jun 27, 2016
3
0
CoCED (The editor) is the closest thing to what you are looking for. Items don't, and likely cannot practically, work that way. They seldom work in such a custom and personalized manner because that would require thousands of different variations of the same item, all tailored to include or exclude selective changes and individual as each player. Many TF items change a broad number of things because they have to in order to minimize the need for an exponentially bloated set of "variants" for the same style of transformations. Besides, what you're asking for is essentially the same thing as a toggle to turn TF's off, which is a little redundant since most of the time, TFs can be easily avoided if one chooses to. When they cannot be avoided (which is very rare), either due to the lack of an alternative path or because you didn't know that choice gives you one, the editor can help to reverse unwanted TF's and undesired changes to your character. I don't like surprise TF's either as I like to build my character to be what I want them to be on day 1, and I will admit CoC does in some cases have events and items that change you without warning, but they are rare enough as is and I cannot think of one that is not avoidable once you learn it's there.


Also, to comment on your earlier issue, the prologue can be skipped during character creation for that reason. The fact that you go through the portal without arms is part of the game's lore. Think Terminator except that it's due to customary tradition rather than scientific reasoning (which is really odd given that franchise's historically complete disregard for factual science in the first place). At least you're not sent through naked, am I right? I'd agree that a warning in bold could be annotated to the screen asking whether you want to play the prologue or not so as to caution the player than some of his or her gear may not accompany them afterwards depending on what possessions they have on them at the time. There's not much to do in the prologue yet anyways as it's unfinished and very WIP.


Finally, to my knowledge, Essy is the one that feeds off the PC, not the other way around. Maybe I missed something in the encounter scene with her? I usually ignore her for the most part.

Umm...hardly?


It would only require switching from fixed values/ranges to variables. When the character is made, their base skin tone, hair colour, height, etc... are written to variables specific to that save. A transformation item trying to revert changes uses the variables in place of fixed values. To use some pseudocode; PCHair =/= PCStartHair, PCHeight > (or <) PCStartHeight, etc...
 

Roadkill007

New Member
Jun 30, 2016
3
0
Hi, I just wanted to pop in and say thanks to whoever is working on the revamp.  I loved the original CoC from awhile back, but only recently rediscovered it, and the revamp brought my youth back !  Not as in nostalgia, but like I couldn't do all-nighter fap/game/read sessions for awhile since my early 20s, but the revamp got me so hooked that I ended up doing tons of all nighters with almost no backlash.  I think I ended up enjoying myself almost fifty times in the past free week thanks to the revamp XD.  Again, something I haven't really done since a younger age. 
 
Last edited by a moderator:

Stadler

Well-Known Member
Jun 21, 2016
366
18
47
@Kitteh6660:
Salamander Firewater is missing the skin TF. Was that intended? If not, I'll include it into my patch (including skinTone = "red" and skinAdj = "thick"). Would make it easier for me to implement ARM_TYPE_PREDATOR later.
 
Last edited by a moderator:

Ormael

Well-Known Member
Aug 27, 2015
6,631
1,786
Salamander Firewater is missing the skin TF. Was that intended? If not, I'll include it into my patch (including skinTone = "red" and skinAdj = "thick"). Would make it easier for me to implement ARM_TYPE_PREDATOR later.

Jumped in since technicaly I made this TF and then gave code for it to Kitteh. So for the skin thing issue you brought. Salamander TF was made acording to pointers that Savin himself gave me. So if you thnk it needed changes I think good would be send some pm to sav about it if he not see it as something against his vision for them.
 

Stadler

Well-Known Member
Jun 21, 2016
366
18
47
Jumped in since technicaly I made this TF and then gave code for it to Kitteh. So for the skin thing issue you brought. Salamander TF was made acording to pointers that Savin himself gave me. So if you thnk it needed changes I think good would be send some pm to sav about it if he not see it as something against his vision for them.

kay, I'll leave it untouched and implement ARM_TYPE_PREDATOR for lizan and dragon only for now. The Mander part will be a seperate patch, after I've talked to Savin.


[Edit:] Oh and another thing:


if (!player.isTaur()) player.legCount = 2; // Maybe I'll revert this, since you can always use Taurinum from Rathazul


As the comment shows I'm considering to revert this to the old
player.legCount = 2;
What do you think?
 
Last edited by a moderator:

Ormael

Well-Known Member
Aug 27, 2015
6,631
1,786
kay, I'll leave it untouched for now and implement ARM_TYPE_PREDATOR for lizan and dragon only for now. The Mander part will be a seperate patch, after I've talked to Savin.

Yeah getting green light from Savin would be perfect solution here.

[Edit:]Oh and another thing:



if (!player.isTaur()) player.legCount = 2; // Maybe I'll revert this, since you can always use Taurinum from Rathazul


As the comment shows I'm considering to revert this to the old



player.legCount = 2;


What do you think?

Etis some time ago changed system for atypcal lower body varsions for PC. So you need to look if it not gonna conflict with drider or naga lower borides. IF not then change it to old as you said.
 

Stadler

Well-Known Member
Jun 21, 2016
366
18
47
Etis some time ago changed system for atypcal lower body varsions for PC. So you need to look if it not gonna conflict with drider or naga lower borides. IF not then change it to old as you said.

The above part was done by me. The lower part is original from the mod. Since reverting it makes it easier to switch between being bipedal or tauric I'll revert it after some more debugging.
 

Ormael

Well-Known Member
Aug 27, 2015
6,631
1,786
@Stadler  Well I not sure from which part of code you showed this piece so I...'m still kinda confused on this as I not know what exactly will it change. If you would tell some more about context of from where you did used this part of the code.
 
Last edited by a moderator: