SA-MP Forums Archive
MySQL Commands - HELP! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL Commands - HELP! (/showthread.php?tid=619294)



MySQL Commands - HELP! - Fratello - 16.10.2016

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;




Re: MySQL Commands - HELP! - Ronaldo1234 - 16.10.2016

show us user stats saving system


Re: MySQL Commands - HELP! - Fratello - 16.10.2016

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?


Re: MySQL Commands - HELP! - Ronaldo1234 - 16.10.2016

i mean show a command which can only a admin can use it


Re: MySQL Commands - HELP! - Konstantinos - 16.10.2016

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


Re: MySQL Commands - HELP! - Fratello - 16.10.2016

Ohh, I forgot about it honestly!

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