|
-
May 17th, 2011, 04:36 AM
#1
Thread Starter
Fanatic Member
Double "char problem
I got error :
error C2440: 'type cast' : cannot convert from 'double' to 'unsigned char *'
code:
Code:
// Guild Alliance Min Players
bool Alliance ( char * ini )
{
BYTE Alliance;
Alliance = GetPrivateProfileInt("Custom","GuildAllianceMinPlayers",20,ini);
*(unsigned char*) GS_GUILD_ALLIANCE_MINPLAYERS = Alliance ;
return 1;
}
//End
-
May 17th, 2011, 05:11 AM
#2
Re: Double "char problem
Where and how is "GS_GUILD_ALLIANCE_MINPLAYERS" declared?
-
May 17th, 2011, 06:00 AM
#3
Thread Starter
Fanatic Member
Re: Double "char problem
its in config.h
and its included in the file but it got errors
how to fix this error?
-
May 17th, 2011, 08:27 AM
#4
Re: Double "char problem
 Originally Posted by Atheist
Where and how is "GS_GUILD_ALLIANCE_MINPLAYERS" declared?
You are apparently trying to cast a double to a char pointer somewhere, which is an invalid typecast.
-
May 17th, 2011, 12:40 PM
#5
Thread Starter
Fanatic Member
Re: Double "char problem
config.h:
#define GS_GUILD_ALLIANCE_MINPLAYERS (0046427E+2)
this is from the info that it gets
any ideas?
-
May 17th, 2011, 01:05 PM
#6
Re: Double "char problem
thats a preprocessor definition, not a variable. You can not assign a value to a preprocessor definition.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|