Invalid function call, "Expected token ";", but found ")"
#1

title

code:

PHP Code:
                        new query[256];
                        
format(querysizeof(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(connectionquery"emptyQuery"); 
Reply
#2

It is [playerid] not (playerid).
Reply
#3

Quote:
Originally Posted by Konstantinos
View Post
It is [playerid] not (playerid).
no
?
Reply
#4

Quote:
Originally Posted by justjamie
View Post
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.
Reply
#5

Quote:
Originally Posted by justjamie
View Post
title

code:

PHP Code:
                        new query[256];
                        
format(querysizeof(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(connectionquery"emptyQuery"); 
Like that.
Reply
#6

Quote:
Originally Posted by AlonzoTorres
View Post
Like that.
doesnt work
Reply
#7

Quote:
Originally Posted by AlonzoTorres
View Post
Like that.
Quote:
Originally Posted by justjamie
View Post
no
?
But he is Right.
Reply
#8

Show us how you declare Name, Ip and playerserial (Either functions or arrays)
Reply
#9

Quote:
Originally Posted by Stinged
View Post
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(playeridname25);
    return 
name;
}
/* ============================================================================= */
stock Ip(playerid) {
    new 
ip[25]; GetPlayerIp(playeridip25);
    return 
ip;
}
/* ============================================================================= */ 
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)