Expected token but found identifier
#1

Hello.
I made a command and a public, but the public seems to error, i have no idea why
PHP Code:
forward CheckSuspend1337(username[]);
public 
CheckSuspend1337(username[])
{
    new 
num_rows,num_fields;
    
cache_get_data(num_rows,num_fields,dbhandle);
    if(
num_rows==0)
    {
    new 
string1337[128];
    
format(string1337,sizeof(string1337),"%s",username);
    
iEcho(string1337);
    }
    else
    {
    new 
string[128],temp_reason[128],temp_bannedby[128],temp_when[128]
    
cache_get_field_content(0"reason"temp_reason);
    
    
cache_get_field_content(0"bannedby"temp_bannedby);
    
    
cache_get_field_content(0"whendidithappen"temp_when);
    
    
format(string,sizeof(string),"%s was banned for %s by %s on %s",username,temp_reason,temp_bannedby,temp_when);
       
iEcho(string);
    return 
true;
    }

I get this error:
(4619) : error 001: expected token: ";", but found "-identifier-"

This is line 4619:

PHP Code:
cache_get_field_content(0"reason"temp_reason); 
What's wrong with it?
Reply
#2

Code:
new string[128],temp_reason[128],temp_bannedby[128],temp_when[128];
bannedby is the admin's name right? It should be MAX_PLAYER_NAME not 128 (waste).
Reply
#3

Quote:
Originally Posted by Konstantinos
View Post
Code:
new string[128],temp_reason[128],temp_bannedby[128],temp_when[128];
oh wow XDD

qq
thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)