SA-MP Forums Archive
small help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: small help (/showthread.php?tid=636049)



small help - Zorono - 19.06.2017

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)



Re: small help - jlalt - 19.06.2017

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.


Re: small help - Zorono - 19.06.2017

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[])



Re: small help - Zorono - 19.06.2017

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


Re: small help - Dayrion - 19.06.2017

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)) { /* ..... */ 



Re: small help - Zorono - 19.06.2017

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