[CMD] - SERVER: Unknown command
#1

Well, in the CMD everything is working fine just one thing, once the pickup create it appears 'SERVER: Unknown command.' is that normal?

PHP код:
CMD:createpickupjob(playeridparams[])
{
    for(new 
0sizeof(InfoTextDrawJob); r++)
    {
        new 
idpickupjobtype[64], nivrequisvwtd=-1INTTDPick;
        new 
Float:xFloat:yFloat:z;
        
GetPlayerPos(playeridxyz);
        if(
sscanf(params,"isii"idpickupjobtypenivrequisINTTDPick)) return SendClientMessage(playerid, -1,"[CMD]: /createpickupjob [IDPickup] [Job] [Niv] [PickupINT]");
        
CreateDynamicPickup(idpickup1xyzvwtd);
        
InfoTextDrawJob[r][LevelRQ] = nivrequis;
        
InfoTextDrawJob[r][InTextX] = x;
        
InfoTextDrawJob[r][InTextY] = y;
        
InfoTextDrawJob[r][InTextZ] = z;
        
InfoTextDrawJob[r][IDPickup] = idpickup;
        
InfoTextDrawJob[r][PickupVW] = vwtd;
        
InfoTextDrawJob[r][PickupINT] = INTTDPick;
        new 
query[450];
        
mysql_format(g_iHandlequerysizeof(query), "INSERT INTO `srv_td_job` (`InTextX` ,`InTextY`,`InTextZ`) VALUES (%f, %f, %f)"xyz);
        
mysql_tquery(g_iHandlequery);
        break;
            
    }
    return 
1;

The problem is only in the CMD, the others commands is working without the message.
Reply
#2

Try to replace 'break;' with 'return 1;'.
Reply
#3

Quote:
Originally Posted by Doudou
Посмотреть сообщение
Try to replace 'break;' with 'return 1;'.
what

Ontopic:

Try using crashdetect, it would tell us if there's a crash. What just came in my mind is that loop crashing because it tries to access an index which is out of range.
Reply
#4

Quote:
Originally Posted by Doudou
Посмотреть сообщение
Try to replace 'break;' with 'return 1;'.
The same problem

Quote:
Originally Posted by PawnHunter
Посмотреть сообщение
Try using crashdetect, it would tell us if there's a crash. What just came in my mind is that loop crashing because it tries to access an index which is out of range.
No result
Reply
#5

Anyone please?
Reply
#6

Put some print to debug your command.
Question, why have you a sscanf line in your loop?
Reply
#7

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Put some print to debug your command.
Question, why have you a sscanf line in your loop?
Well I'll put some print, do you mean sscanf must be above the loop?

Edit: after trying with print there's no result, I see only the print :
[21:49:58] Command successful
No others things
Reply
#8

Your command mean nothing. Why have you a loop?
Try this :
PHP код:
CMD:createpickupjob(playeridparams[]) 
{
    print(
"Starting command...")
    new 
idpickupjobtype[64], nivrequisvwtd=-1INTTDPick
    new 
Float:xFloat:yFloat:z
    
GetPlayerPos(playeridxyz); 
    if(
sscanf(params,"isii"idpickupjobtypenivrequisINTTDPick)) return SendClientMessage(playerid, -1,"[CMD]: /createpickupjob [IDPickup] [Job] [Niv] [PickupINT]"); 
    
CreateDynamicPickup(idpickup1xyzvwtd); 
    
printf("nivrequis: %i | x:%.2f | y:%.2f | z:%.2f | idpickup : %i | vwtd : %i | INTTDPick : %i"nivrequisxyzidpickupvwtdINTTDPick);
    
InfoTextDrawJob[r][LevelRQ] = nivrequis
    
InfoTextDrawJob[r][InTextX] = x
    
InfoTextDrawJob[r][InTextY] = y
    
InfoTextDrawJob[r][InTextZ] = z
    
InfoTextDrawJob[r][IDPickup] = idpickup
    
InfoTextDrawJob[r][PickupVW] = vwtd
    
InfoTextDrawJob[r][PickupINT] = INTTDPick
    new 
query[450]; 
    print(
"Saving MYQSL params")
    
mysql_format(g_iHandlequerysizeof(query), "INSERT INTO `srv_td_job` (`InTextX` ,`InTextY`,`InTextZ`) VALUES (%f, %f, %f)"xyz); 
    
mysql_tquery(g_iHandlequery); 
    return 
1

Reply
#9

@Dayrion Just tried, but no result it always show the message

Code:
PHP код:
CMD:createpickupjob(playeridparams[])
{
    print(
"Starting command...");
    new 
idpickupjobtype[64], nivrequisvwtd=-1INTTDPick;
    new 
Float:xFloat:yFloat:z;
    
GetPlayerPos(playeridxyz);
    if(
sscanf(params,"isii"idpickupjobtypenivrequisINTTDPick)) return SendClientMessage(playerid, -1,"[CMD]: /createpickupjob [IDPickup] [Job] [Niv] [PickupINT]");
    
CreateDynamicPickup(idpickup1xyzvwtd);
    
printf("nivrequis: %i | x:%.2f | y:%.2f | z:%.2f | idpickup : %i | vwtd : %i | INTTDPick : %i"nivrequisxyzidpickupvwtdINTTDPick);
    new 
query[450];
    print(
"Saving MYQSL params");
    
mysql_format(g_iHandlequerysizeof(query), "INSERT INTO `srv_td_job` (`InTextX` ,`InTextY`,`InTextZ`) VALUES (%f, %f, %f)"xyz);
    
mysql_tquery(g_iHandlequery);
    return 
1;

Logs:
Код:
[23:42:51] Starting command...
[23:42:57] Starting command...
[23:42:57] nivrequis: 1 | x:1848.79 | y:-1814.41 | z:3.98 | idpickup : 1239 | vwtd : -1 | INTTDPick : 0
[23:42:57] Saving MYQSL params
Reply
#10

No one please??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)