MySQL Commands - HELP!
#1

Hello. I'm working on a mySQL gamemode. The database is working fine with all other functions. I started working on commands and i got an error.


Here is screenshot from code:
http://imgur.com/a/4qb2z

My database name is : "players" but some of the codes in a script are registring to " Player ".
Here is compile error:
http://imgur.com/a/mJBF6

When I change from "Players" to "player"/"players" I got same error.

I'm little bit confused. Please help me!

Assests:
PHP код:
CMD:test(playeridparams[])
{
    if(
Player[playerid][kills] == 1)
    {
        
SendClientMessage(playerid, -1" g");
    }
    else
    {
        
SendClientMessage(playerid, -1" not ");
    }
        return 
1;

Reply
#2

show us user stats saving system
Reply
#3

Oh sorry, i totally forgot about it.

PHP код:
enum E_PLAYERS
{
    
ID,
    
Name[MAX_PLAYER_NAME],
    
Password[65], // the output of SHA256_PassHash function (which was added in 0.3.7 R1 version) is always 256 bytes in length, or the equivalent of 64 Pawn cells
    
Salt[17],
    
pAdmin,
    
Kills,
    
Deaths,
    
FloatX_Pos,
    
FloatY_Pos,
    
FloatZ_Pos,
    
FloatA_Pos,
    
Interior,
        
readpm,
        
Last,
        
PM,
        
NoPM,
    
CacheCache_ID,
    
boolIsLoggedIn,
    
LoginAttempts,
    
LoginTimer
};
new 
Player[MAX_PLAYERS][E_PLAYERS]; 
This is what was you looking for?
Reply
#4

i mean show a command which can only a admin can use it
Reply
#5

Do you place the command above the enumeration and Player array? It should be placed after those so they'll be defined.
Reply
#6

Ohh, I forgot about it honestly!

I was just confused for database i totally forgot where to put commands.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)