[C++] Increased gold

07/26/2016 21:42 amukaçi35#31
Quote:
Originally Posted by .T4Ump View Post
you using novaline?
fixed



+ exp quest function > pc.give_exp2

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



- exp quest function > pc.del_exp3

[Only registered and activated users can see links. Click Here To Register...]
07/31/2016 20:09 Alergix2#32
Geiler Shit!
08/04/2016 21:32 .T4Ump#33
Quote:
Originally Posted by .0x404´Err0xR View Post
Geiler Shit!
Whaat? :D Positive or negative?
08/06/2016 12:22 lollo_9_1#34
Quote:
Originally Posted by kstmr View Post
what you said is what a wise person would do.
what you said is what most of those retarded player hate.
Otherwise, people can implement the Won System, since it adds a new currency of it.

@[Only registered and activated users can see links. Click Here To Register...]
1) Be sure to check the signness of the type and use it
Little example to make it cuter:
Code:
#ifdef ENABLE_GOLD_LIMIT_INCREASE
typedef long long GoldType;
typedef signed long long sGoldType;
typedef unsigned long long uGoldType;
#else
typedef int GoldType;
typedef signed int sGoldType;
typedef unsigned int uGoldType;
#endif
2) Doing as you did, you will get quite a lot of format warnings (and also errors) related to %d/%u -> %lld

Little example to make it cuter:
Code:
#ifdef ENABLE_GOLD_LIMIT_INCREASE
#define "%lld" GOLD_FORMAT
#define "%lld" SGOLD_FORMAT
#define "%llu" UGOLD_FORMAT
#else
#define "%d" GOLD_FORMAT
#define "%d" SGOLD_FORMAT
#define "%u" UGOLD_FORMAT
#endif
3) This if you want to use long long, and int, instead of int64_t/int32_t, and the relative PRId32/PRId64.
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]

4) There's no need to change all the points to 64bit and create infinite bugs, when you can simply create a separate 64bit point handling just for the gold.
08/06/2016 23:46 .T4Ump#35
Quote:
Originally Posted by lollo_9_1 View Post
Otherwise, people can implement the Won System, since it adds a new currency of it.

@[Only registered and activated users can see links. Click Here To Register...]
1) Be sure to check the signness of the type and use it
Little example to make it cuter:
Code:
#ifdef ENABLE_GOLD_LIMIT_INCREASE
typedef long long GoldType;
typedef signed long long sGoldType;
typedef unsigned long long uGoldType;
#else
typedef int GoldType;
typedef signed int sGoldType;
typedef unsigned int uGoldType;
#endif
2) Doing as you did, you will get quite a lot of format warnings (and also errors) related to %d/%u -> %lld

Little example to make it cuter:
Code:
#ifdef ENABLE_GOLD_LIMIT_INCREASE
#define "%lld" GOLD_FORMAT
#define "%lld" SGOLD_FORMAT
#define "%llu" UGOLD_FORMAT
#else
#define "%d" GOLD_FORMAT
#define "%d" SGOLD_FORMAT
#define "%u" UGOLD_FORMAT
#endif
3) This if you want to use long long, and int, instead of int64_t/int32_t, and the relative PRId32/PRId64.
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]

4) There's no need to change all the points to 64bit and create infinite bugs, when you can simply create a separate 64bit point handling just for the gold.
Hmmm, thanks for training.
08/07/2016 14:47 Alergix2#36
Quote:
Originally Posted by .T4Ump View Post
Whaat? :D Positive or negative?
Positive
10/12/2016 00:44 fcsk_aim#37
Quote:
Originally Posted by lollo_9_1 View Post
Otherwise, people can implement the Won System, since it adds a new currency of it.

@[Only registered and activated users can see links. Click Here To Register...]
1) Be sure to check the signness of the type and use it
Little example to make it cuter:
Code:
#ifdef ENABLE_GOLD_LIMIT_INCREASE
typedef long long GoldType;
typedef signed long long sGoldType;
typedef unsigned long long uGoldType;
#else
typedef int GoldType;
typedef signed int sGoldType;
typedef unsigned int uGoldType;
#endif
2) Doing as you did, you will get quite a lot of format warnings (and also errors) related to %d/%u -> %lld

Little example to make it cuter:
Code:
#ifdef ENABLE_GOLD_LIMIT_INCREASE
#define "%lld" GOLD_FORMAT
#define "%lld" SGOLD_FORMAT
#define "%llu" UGOLD_FORMAT
#else
#define "%d" GOLD_FORMAT
#define "%d" SGOLD_FORMAT
#define "%u" UGOLD_FORMAT
#endif
3) This if you want to use long long, and int, instead of int64_t/int32_t, and the relative PRId32/PRId64.
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]

4) There's no need to change all the points to 64bit and create infinite bugs, when you can simply create a separate 64bit point handling just for the gold.

In 2016 people don't use typedef is deprecated and will be removed soon.

Code:
#ifdef ENABLE_GOLD_LIMIT_INCREASE
using GoldType = long long;
using sGoldType = signed long long;
using uGoldType = unsigned long long;
#else
using GoldType = int;
using sGoldType = signed int;
using uGoldType = unsigned int;
#endif
The using syntax has an advantage when used within templates. If you need the type abstraction, but also need to keep template parameter to be possible to be specified in future.
[Only registered and activated users can see links. Click Here To Register...]
10/12/2016 00:54 _asm#38
Quote:
Originally Posted by fcsk_aim View Post
The using syntax has an advantage when used within templates. If you need the type abstraction, but also need to keep template parameter to be possible to be specified in future.
[Only registered and activated users can see links. Click Here To Register...]
nice c&p from 4xy on [Only registered and activated users can see links. Click Here To Register...]
10/12/2016 01:13 fcsk_aim#39
Quote:
Originally Posted by _asm View Post
nice c&p from 4xy on [Only registered and activated users can see links. Click Here To Register...]
This don't make any sense.
I can't explain it, i know how to use it but i can't explain in my words since my English is not perfect. Soo, i better copy & paste in this way is easy for other people to understand. :)

THAT WAS one of the shorter explain that i found. But not this is the point , typedef is deprecated and in 2016 we should use 2016 offer. This is what you SHOULD notice from my comment. Not copy paste.

Don't try to look smart. :d
10/12/2016 08:26 lollo_9_1#40
Quote:
Originally Posted by _asm View Post
nice c&p from 4xy on [Only registered and activated users can see links. Click Here To Register...]
What is more funny is that "typedef" isn't deprecated at all in c/c++. :rolleyes:
So the intervention of that special kid is totally useless and very misleading.

@[Only registered and activated users can see links. Click Here To Register...], .T4Ump removed his tutorial, so his thread can be closed now.