SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 19/02/2019, 06:44 AM   #1
p3p4
Little Clucker
 
Join Date: Jan 2019
Posts: 8
Reputation: 0
Default error 001: expected token: "-identifier-", but found "["

error 001: expected token: "-identifier-", but found "["
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line




Error is in this lines :
Quote:
new query[200], admin[50], pname[50], IP[16], string1[100];
and

Quote:
GetPlayerIp(playerid, IP, 16);




Pawn code :

Quote:
stock MySQL_BanCheck(playerid)
{
new query[200], admin[50], pname[50], IP[16], string1[100];
GetPlayerIp(playerid, IP, 16);
format(query, sizeof(query),"SELECT * FROM `bandata` WHERE(`player`='%s' OR `IP`='%s') AND `banned`=1 LIMIT 1", escpname(playerid), IP);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows() != 0)
{
while(mysql_fetch_row(query))
{
mysql_fetch_field_row(admin, "admin");
mysql_fetch_field_row(pname, "player");
mysql_fetch_field_row(string1, "reason");
}
new string[50], str[50], str1[100];
format(string, sizeof(string),"Admin: {FFFFFF}%s", admin);
format(str, sizeof(str),"Player: {FFFFFF}%s", pname);
format(str1, sizeof(str1),"Reason: {FFFFFF}%s", string1);
SendClientMessage(playerid, RED,"You are banned from this server!");
SendClientMessage(playerid, RED,"___________________");
SendClientMessage(playerid, RED, str);
SendClientMessage(playerid, RED, string);
SendClientMessage(playerid, RED, str1);
SendClientMessage(playerid, RED,"___________________");
SendClientMessage(playerid, RED, "If you think you this is a mistake please visit our website");
SendClientMessage(playerid, RED, "www.cod-samp.in"); //Change ME!
Kick(playerid);
}
mysql_free_result();
return 1;
}
p3p4 is offline   Reply With Quote
Old 19/02/2019, 11:09 AM   #2
TokicMajstor
Huge Clucker
 
TokicMajstor's Avatar
 
Join Date: Oct 2018
Location: Bosnia And Herzegovina
Posts: 212
Reputation: 10
Default Re: error 001: expected token: "-identifier-", but found "["

Code:
new query[200], admin[50], pname[50], IP[50],  string1[100];
GetPlayerIp(playerid, IP, sizeof(IP));
__________________

My work:
-MapTD - GTA SA Map on a TextDraw

https://forum.sa-mp.com/showthread.php?t=671806
TokicMajstor is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error 001: expected token: "-string end-", but found "-identifier-". When compiling a scipt with register/login Gorgeousmaniac Scripting Help 3 22/08/2016 10:11 AM
[Ajuda] error 001: expected token: ";", but found "-identifier-" no main()? rep ++ Duduloch PortuguÍs/Portuguese 3 15/09/2013 02:30 PM
error 001: expected token: "-string end-", but found "-identifier-" Any Ideas? Jack_Rocker Scripting Help 4 04/11/2011 01:03 PM
error 001: expected token: "-string end-", but found "-identifier-" samtey Help Archive 9 04/08/2011 01:26 PM


All times are GMT. The time now is 05:00 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.