18.07.2015, 10:36
I wanted to made myself a MySQL connection to my own gamemode and I made a login/register system and I wanted to save the player on it's exit.. and-.. errors.
errors
Andd-.. the lines with problems.
The f'ck is bugged ?
errors
Код:
C:\Users\SpikeSpigel\Desktop\MyGamemode.pwn(90) : warning 219: local variable "query" shadows a variable at a preceding level C:\Users\SpikeSpigel\Desktop\MyGamemode.pwn(90) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\SpikeSpigel\Desktop\MyGamemode.pwn(279) : warning 219: local variable "query" shadows a variable at a preceding level C:\Users\SpikeSpigel\Desktop\MyGamemode.pwn(279) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\SpikeSpigel\Desktop\MyGamemode.pwn(301) : warning 219: local variable "query" shadows a variable at a preceding level C:\Users\SpikeSpigel\Desktop\MyGamemode.pwn(301) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\SpikeSpigel\Desktop\MyGamemode.pwn(322) : warning 219: local variable "query" shadows a variable at a preceding level C:\Users\SpikeSpigel\Desktop\MyGamemode.pwn(322) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\SpikeSpigel\Desktop\MyGamemode.pwn(339) : error 055: start of function body without function header C:\Users\SpikeSpigel\Desktop\MyGamemode.pwn(341) : error 021: symbol already defined: "GetPlayerName" C:\Users\SpikeSpigel\Desktop\MyGamemode.pwn(343) : error 021: symbol already defined: "format" C:\Users\SpikeSpigel\Desktop\MyGamemode.pwn(347) : error 021: symbol already defined: "SpawnPlayer" C:\Users\SpikeSpigel\Desktop\MyGamemode.pwn(349) : warning 203: symbol is never used: "pName" C:\Users\SpikeSpigel\Desktop\MyGamemode.pwn(349) : warning 203: symbol is never used: "query" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Код:
stock SavePlayer(playerid); { new query[126], pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, sizeof(pName) format(query, sizeof(query), "UPDATE accounts SET Username = '%s', Password = '%s' WHERE Username = '&s'", pName, Player[playerid][Password], pName); mysql_query(query); mysql_store_result(); SpawnPlayer(playerid); }