Invalid function call, "Expected token ";", but found ")" -
justjamie - 25.06.2016
title
code:
PHP Code:
new query[256];
format(query, sizeof(query), "INSERT INTO Accounts (Username, regip,reggpci, Sex, Skin, Admin, Helper, Money, BankMoney, Level, Points, PayTime) VALUES ('%s', '%s','%s', '0', '60', '0', '0', '1250', '7750', '0', '0', '0')", Name(playerid), Ip(playerid),playerserial(playerid));
mysql_tquery(connection, query, "emptyQuery");
Re: Invalid function call, "Expected token ";", but found ")" -
Konstantinos - 25.06.2016
It is
[playerid] not
(playerid).
Re: Invalid function call, "Expected token ";", but found ")" -
justjamie - 25.06.2016
Quote:
Originally Posted by Konstantinos
It is [playerid] not (playerid).
|
no
?
Re: Invalid function call, "Expected token ";", but found ")" -
Konstantinos - 25.06.2016
Quote:
Originally Posted by justjamie
no
?
|
Unless you post how you defined "Name", "Ip" and "playerserial" nobody can guess. When I declared a 2D array and used parentheses to reproduce it, I get 2 errors: one for invalid function call and the other for expecting ";" but finding ")". Not sure if you get both at once.
Re: Invalid function call, "Expected token ";", but found ")" -
AlonzoTorres - 25.06.2016
Quote:
Originally Posted by justjamie
title
code:
PHP Code:
new query[256];
format(query, sizeof(query), "INSERT INTO Accounts (Username, regip,reggpci, Sex, Skin, Admin, Helper, Money, BankMoney, Level, Points, PayTime) VALUES ('%s', '%s','%s', '0', '60', '0', '0', '1250', '7750', '0', '0', '0')", Name[playerid], Ip[playerid],playerserial[playerid]);
mysql_tquery(connection, query, "emptyQuery");
|
Like that.
Re: Invalid function call, "Expected token ";", but found ")" -
justjamie - 25.06.2016
Quote:
Originally Posted by AlonzoTorres
Like that.
|
doesnt work
Re: Invalid function call, "Expected token ";", but found ")" - WhiteGhost - 25.06.2016
Quote:
Originally Posted by AlonzoTorres
Like that.
|
Quote:
Originally Posted by justjamie
no
?
|
But he is Right.
Re: Invalid function call, "Expected token ";", but found ")" -
Stinged - 25.06.2016
Show us how you declare Name, Ip and playerserial (Either functions or arrays)
Re: Invalid function call, "Expected token ";", but found ")" -
justjamie - 26.06.2016
Quote:
Originally Posted by Stinged
Show us how you declare Name, Ip and playerserial (Either functions or arrays)
|
new playerserial[150];
(global string)
PHP Code:
/* ============================================================================= */
stock Name(playerid) {
new name[25]; GetPlayerName(playerid, name, 25);
return name;
}
/* ============================================================================= */
stock Ip(playerid) {
new ip[25]; GetPlayerIp(playerid, ip, 25);
return ip;
}
/* ============================================================================= */
Re: Invalid function call, "Expected token ";", but found ")" -
Sjn - 26.06.2016
Why not just use local arrays to grab names/ips? I find using functions for these stuff kinda useless. Or just store their name/ip in an array from player's enumerator.