AccountData[playerid][szEmail] == inputtext;
C:\Users\Monster\Desktop\samp03z_svr_R1_win32\gamemodes\freeroam.pwn(237) : error 033: array must be indexed (variable "inputtext") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
format(szQuery, sizeof(szQuery), "INSERT INTO `accounts` (email) VALUES ('%s')", AccountData[playerid][szEmail]);
mysql_function_query(MainPipeline, szQuery, true, "OnQueryFinish", "ii", THREAD_NO_RESULT, playerid);
You can use
variable = something; for integers and floats, for strings you have to use format: format(AccountData[playerid][szEmail],sizeof(AccountData[playerid][szEmail]),"%s",inputtext); |
C:\Users\Monster\Desktop\samp03z_svr_R1_win32\gamemodes\efs.pwn(237) : error 001: expected token: "]", but found "-identifier-" C:\Users\Monster\Desktop\samp03z_svr_R1_win32\gamemodes\efs.pwn(237) : warning 215: expression has no effect C:\Users\Monster\Desktop\samp03z_svr_R1_win32\gamemodes\efs.pwn(237) : error 001: expected token: ";", but found "]" C:\Users\Monster\Desktop\samp03z_svr_R1_win32\gamemodes\efs.pwn(237) : error 029: invalid expression, assumed zero C:\Users\Monster\Desktop\samp03z_svr_R1_win32\gamemodes\efs.pwn(237) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
format(szQuery, sizeof(szQuery), "INSERT INTO `accounts` (email) VALUES ('%s')", inputtext);
mysql_function_query(MainPipeline, szQuery, true, "OnQueryFinish", "ii", THREAD_NO_RESULT, playerid);
I get errors:
Код:
C:\Users\Monster\Desktop\samp03z_svr_R1_win32\gamemodes\efs.pwn(237) : error 001: expected token: "]", but found "-identifier-" C:\Users\Monster\Desktop\samp03z_svr_R1_win32\gamemodes\efs.pwn(237) : warning 215: expression has no effect C:\Users\Monster\Desktop\samp03z_svr_R1_win32\gamemodes\efs.pwn(237) : error 001: expected token: ";", but found "]" C:\Users\Monster\Desktop\samp03z_svr_R1_win32\gamemodes\efs.pwn(237) : error 029: invalid expression, assumed zero C:\Users\Monster\Desktop\samp03z_svr_R1_win32\gamemodes\efs.pwn(237) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. I can do like this if i want and it works: pawn Код:
|
format(AccountData[playerid][szEmail],100,"%s",inputtext);
format ( AccountData[playerid][szEmail], sizeof ( AccountData[playerid][szEmail] ), "%s", inputtext);