ShoppingMall

07/26/2009 03:40 Arcotemple:)#1
K i got +1 and +2 stones in my shopping mall
but they dont work
i can buy them but i cant use them to compose
anyone know whats the deal?
07/26/2009 03:55 f0am#2
most likely its just +1 stone, not +1Stone(+1)
07/26/2009 03:59 Arcotemple:)#3
yeah thats it
but idk how to make ti (+1) is what im sayin
07/26/2009 05:05 f0am#4
itemtype
07/26/2009 05:12 Incariuz#5
It should work fine based on the one available in the itemtype.dat

It worked fine for me when I was working on an LOTF source.

730001
07/26/2009 06:02 Zeroxelli#6
I addressed this, but as usual it was overlooked.

Code:
if (BuyItem.ItemID >= 730001 && BuyItem.ItemID <= 730009)
    BuyItem.Plus = int.Parse(BuyItem.ItemID.ToString().Substring(5));
07/26/2009 06:14 Arcotemple:)#7
nvm i made a solution
i made +1 and +2stonpacks available in shoppin gmall
07/26/2009 08:55 Zeroxelli#8
..+2 stone pack?


Also, that's no solution to the problem. Such actions are what lead to an abrupt end in this industry. Solve the problem, then add the packs. Makes everyone happier.
07/26/2009 08:59 kinshi88#9
Quote:
Originally Posted by Zeroxelli View Post
I addressed this, but as usual it was overlooked.

Code:
if (BuyItem.ItemID >= 730001 && BuyItem.ItemID <= 730009)
    BuyItem.Plus = int.Parse(BuyItem.ItemID.ToString().Substring(5));
if (BuyItem.ItemID / 10 == 73000)
BuyItem.Plus = BuyItem.ItemID % 10;
07/26/2009 09:05 Arcotemple:)#10
#request close i fixed it
07/26/2009 21:10 Zeroxelli#11
Quote:
Originally Posted by kinshi88 View Post
if (BuyItem.ItemID / 10 == 73000)
BuyItem.Plus = BuyItem.ItemID % 10;
If my math is still good, you'd have to round that.

Code:
BuyItem.ItemID / 10
Should equal:
73000.1
73000.2
etc
07/26/2009 22:03 kinshi88#12
Quote:
Originally Posted by Zeroxelli View Post
If my math is still good, you'd have to round that.

Code:
BuyItem.ItemID / 10
Should equal:
73000.1
73000.2
etc
Only double and decimal values include the decimal.
So it would be 73000.

If it didnt work, you could always do:
Code:
(int)(BuyItem.ItemID / 10)
07/26/2009 23:23 Arcotemple:)#13
lol i still dont know how to fix it instead of just putting +1 and +2StonePacks in my shopppingmall
07/26/2009 23:33 Zeroxelli#14
Quote:
Originally Posted by kinshi88 View Post
Only double and decimal values include the decimal.
So it would be 73000.

If it didnt work, you could always do:
Code:
(int)(BuyItem.ItemID / 10)
You'd have to cast it as int depending on your compiler, most would cast it to double once you divided it. And, I haven't even touched any CO source in a long time now. Been making little games from scratch with the XNA framework, :) Here's a small example of the starting of one simpler game:

[Only registered and activated users can see links. Click Here To Register...]

It's rather fun to mess with.
07/26/2009 23:50 _tao4229_#15
No, if you divide an int by an int it'll produce an int.
There's only one 'real' C# compiler; as for IDEs there's visual studio and #develop as the main ones, but both of them use the microsoft compiler ('csc.exe'). That compiler will produce an int when two ints are divided. (Even if you do this..
Code:
int i = 3;
int o = 2;
double d = i / o;
'd' still equals 1.)