PDA

View Full Version : undefined..


SpikeSpigel
18/07/2015, 02:20 AM
Hi there. I wanted to make my own gamemode-.. so-.. I started, I made the connection for mysql, login/register system and now I wanted to make a SavePlayer and a LoginPlayer stock so-.. I got some errors and I don't know how to solve 'em. I don't want just to repair, I want you guys to repair that for me, of course but I want you to tell me what I've done wrong.

errors:
C:\Users\SpikeSpigel\Desktop\MyGamemode.pwn(328) : error 017: undefined symbol "mysql_fetch_row_format"
C:\Users\SpikeSpigel\Desktop\MyGamemode.pwn(328) : error 036: empty statement
C:\Users\SpikeSpigel\Desktop\MyGamemode.pwn(330) : error 017: undefined symbol "mysql_fetch_field_row"
C:\Users\SpikeSpigel\Desktop\MyGamemode.pwn(331) : error 017: undefined symbol "mysql_fetch_field_row"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

stock:

stock LoginPlayer(playerid)
{
new query[126], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(query, sizeof(query), "SELECT FROM * accounts WHERE name = '%s'", pName);
mysql_query(query);
mysql_store_result();


while(mysql_fetch_row_format(query, " "));
{
mysql_fetch_field_row(Player[playerid][Username], "Username");
mysql_fetch_field_row(Player[playerid][Password], "Password");
}
SpawnPlayer(playerid);
}

the bugged lines:

while(mysql_fetch_row_format(query, " ")); // LINE 328

mysql_fetch_field_row(Player[playerid][Username], "Username"); // LINE 330

mysql_fetch_field_row(Player[playerid][Password], "Password"); // LINE 331

SpikeSpigel
18/07/2015, 02:27 AM
I think I repair it. I only needed to change these: mysql_fetch_field_row or mysql_fetch_row_format or anything which have format and field to these : mysql_fetch_row ... Sooo-.. That's it ? I repaired that or I bugged that with these "new" commands ?

Toxik
18/07/2015, 02:34 AM
try to open your server and test ?!?
_________________Anti Russia________________________
got russians on your server? use an simple anti cheat
Just an joke im sleeply
____________________


OnNonRussianConnect(COLOR_BLUE,"Hello, im a pro admin");
OnRussianConnect(COLOR_RED,"Hello!");
forward(AntiRussia);
public AntiRussia(playerid,Country)
{
//Simple AntiRussia
OnRussianConnect(if(GetCountry(Russia));
Ban(playerid);
OnAntiRussian(COLOR_GREEN,"You are banned from this server");
}