MySQL errors
#1

Hey guys,

after a very long break from samp, I lost some of my knowledge.
Last night I was converting my script to mysql r33 version following this tutorial

https://sampforum.blast.hk/showthread.php?tid=485633

And I got some errors,

Код:
C:\Users\Emilio\Desktop\samp 0.3z\gamemodes\MySQLCops.pwn(1556) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
C:\Users\Emilio\Desktop\samp 0.3z\gamemodes\MySQLCops.pwn(1556) : warning 215: expression has no effect
C:\Users\Emilio\Desktop\samp 0.3z\gamemodes\MySQLCops.pwn(1556) : error 001: expected token: ";", but found "]"
C:\Users\Emilio\Desktop\samp 0.3z\gamemodes\MySQLCops.pwn(1556) : error 029: invalid expression, assumed zero
C:\Users\Emilio\Desktop\samp 0.3z\gamemodes\MySQLCops.pwn(1556) : fatal error 107: too many error messages on one line
This is the line 1556

pawn Код:
mysql_format(mysql, query, sizeof(query), "UPDATE `users` SET `AdminLvl`=%d, `VIPLvl`=%d, `Money`=%d, WHERE `ID`=%d",pInfo[playerid][pAdmin], pInfo[playerid][pVIP], pInfo[playerid][pMoney], pInfo[playerid][pID]);
This is the part of the code where the line is located

pawn Код:
new query[128];//query[128] is for formatting our query
    mysql_format(mysql, query, sizeof(query), "UPDATE `users` SET `AdminLvl`=%d, `VIPLvl`=%d, `Money`=%d, WHERE `ID`=%d",pInfo[playerid][pAdmin], pInfo[playerid][pVIP], pInfo[playerid][pMoney], pInfo[playerid][pID]);
    mysql_tquery(mysql, query, "", "");
Kind Regards
Reply
#2

Change this
pawn Код:
enum PInfo
{
to this
pawn Код:
enum PlayerData
{
pawn Код:
new PInfo[MAX_PLAYERS][PlayerData];
Reply
#3

Quote:
Originally Posted by ManuelNeuer
Посмотреть сообщение
Change this
pawn Код:
enum PInfo
{
to this
pawn Код:
enum PlayerData
{
pawn Код:
new PInfo[MAX_PLAYERS][PlayerData];
Nothing changes


EDIT: Fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)