small help
#1

hey all, please could anyone help me solving this proplem please ??
The Code:
Code:
if (SQL_GetFloat(playerid, "accounts","x1")!=0) { // (33565)
    	SetPlayerPos(playerid, SQL_GetFloat(playerid, "accounts", "x1"), SQL_GetFloat(playerid, "accounts", "y1"), SQL_GetFloat(playerid, "accounts", "z1")); // (33566) 
}
if(strcmp(SQL_GetString(player1, "accounts", "LS"), '0', true)) { /* ..... */ } // (28628)
ERRORS:
Code:
(33565) : error 035: argument type mismatch (argument 1)
(33566) : error 035: argument type mismatch (argument 1)
(28628) : error 035: argument type mismatch (argument 2)
Reply
#2

PHP Code:
Float:sql_GetFloat(DB:database,table[],field[],get[]) 
You're passing playerid as database id which is completely wrong, put database id there instead of playerid.
Reply
#3

Quote:
Originally Posted by jlalt
View Post
PHP Code:
Float:sql_GetFloat(DB:database,table[],field[],get[]) 
You're passing playerid as database id which is completely wrong, put database id there instead of playerid.
thanks for your reply but my function is pre-scripted function not any another
syntax
Code:
SQL_GetFloat(playerid, table[], field[])
Reply
#4

Bumb anyone
this one resolved
Code:
if (SQL_GetFloat(playerid, "accounts","x1")!=0) { 
    	SetPlayerPos(playerid, SQL_GetFloat(playerid, "accounts", "x1"), SQL_GetFloat(playerid, "accounts", "y1"), SQL_GetFloat(playerid, "accounts", "z1"));
}
but iam getting some proplem on solving this proplem
Code:
if(strcmp(SQL_GetString(player1, "accounts", "LS"), '0', true)) { /* ..... */ }
Syntax:
Code:
SQL_GetString(playerid, table[], field[])
please some help
Reply
#5

PHP Code:
if(strcmp(SQL_GetString(player1"accounts""LS"), '0'true)) { /* ..... */ 
That's false since you compare a character (integer) with a string (string).
PHP Code:
if(strcmp(SQL_GetString(player1"accounts""LS"), "0"true)) { /* ..... */ 
Reply
#6

Quote:
Originally Posted by Dayrion
View Post
PHP Code:
if(strcmp(SQL_GetString(player1"accounts""LS"), '0'true)) { /* ..... */ 
That's false since you compare a character (integer) with a string (string).
PHP Code:
if(strcmp(SQL_GetString(player1"accounts""LS"), "0"true)) { /* ..... */ 
Thanks so much that worked
+repped
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)