Jump to content
MakeWebGames

Compare Statement ... maybe


Recommended Posts

Posted

I'm trying to find a shorter way of getting this idea to work ... I've considered arrays, elseif statements even a while loop but they would lead to well over 2000 lines of code.

This is what I am trying to implement;

If 'x'=1 then 'y'='z'*1

elseif 'x'=2 then 'y'='z'*1.2

elseif 'x'=3 then 'y'='z'*1.4

elseif 'x'=4 then 'y'='z'*1.6

elseif 'x'=5 then 'y'='z'*1.8

elseif 'x'=6 then 'y'='z'*2

elseif 'x'=7 then 'y'='z'*2.2

etc.

I want the process to check 'x' where 'x' can be a number between 1 and 2000 and that the multiplier of 'z' increases by .2 for each 'x' increase, so that if 'x'=98 then the process will pull 'z' as 'z'='z'*11.4 and so on.

Any ideas or suggestions that can point me in the right direction would be greatly appreciated. Thanks.

Posted

@Danny696 ... I tried your idea and unfortunately I couldn't get it to work the way I need it too. Thank you for your suggestion just the same.

@Dayo ... if you were close by ... I'd kiss you. :P Your suggestion works perfectly. Thank you very much.

Posted

Thanks Dayo ... I think I have it so far. I'm just setting up my "mock" tables and such first then I will give it a more in depth test to make sure it all works the way I need it to.

Would you like to see it when I have it all set up?

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.   Paste as plain text instead

  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.

×
×
  • Create New...