MySQL Faction System
#1

Код:
C:\Users\Toni\Desktop\aaaaaaaaaaa\gamemodes\ALRPDM22.pwn(8831) : error 017: undefined symbol "playername"
C:\Users\Toni\Desktop\aaaaaaaaaaa\gamemodes\ALRPDM22.pwn(8831) : error 017: undefined symbol "playername"
C:\Users\Toni\Desktop\aaaaaaaaaaa\gamemodes\ALRPDM22.pwn(8831) : error 029: invalid expression, assumed zero
C:\Users\Toni\Desktop\aaaaaaaaaaa\gamemodes\ALRPDM22.pwn(8831) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Код:
    // probajen factions
    GetPlayerName(playerid, playername, sizeof(playername)); //You still have to create the variable playername
	format(string, sizeof(string), "UPDATE `table` SET factionid = %i, rank = %i WHERE Username = %s", pData[playerid][Faction], pData[playerid][Rank], playername); //Updating mysql database with facitonid/rank
	mysql_query(string); //Sending the query.  Remember, must still create the variable "string"
	// =====
+

if someone can help me with making saving system for these factions!?

Need to create table first or?
Reply
#2

Yes, you need to create the table if you do not create it will result in an error in the log.
PHP код:
        new playername[30];   
        
GetPlayerName(playeridplayernamesizeof(playername)); //You still have to create the variable playername
    
format(stringsizeof(string), "UPDATE `table` SET factionid = %i, rank = %i WHERE Username = %s"pData[playerid][Faction], pData[playerid][Rank], playername); //Updating mysql database with facitonid/rank
    
mysql_query(string); //Sending the query.  Remember, must still create the variable "string" 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)