Compile error
#1

Error:

PHP код:
C:\Users\Bruno\Desktop\CoD-Rivals\CoD-Rivals\gamemodes\CoD-R.pwn(166) : error 017undefined symbol "idx"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
1 Error

Line of error:

PHP код:
//============================================================================//
//====================================Comandos================================//
//============================================================================//
//==================================Comandos para Admins======================//
public OnPlayerCommandText(playerid,cmdtext[])
    {
    if(!
IsPlayerAdmin(playerid)) return 0;
    if(
strcmp(cmdtext"/respawn_veh",true) == 0) {
    new 
tmp[256];
    
tmp strtok(cmdtext,idx);                       @@@@@@@ Line 166@@@@@@@@@@@@
    
SetVehicleToRespawn(strval(tmp));
    return 
1;
    } 
Reply
#2

The error is obvious.

pawn Код:
new idx;
Reply
#3

Thank you but why when i use the cmds vehicles dosent respawn?

PHP код:
public OnPlayerCommandText(playerid,cmdtext[])
{
    if(!
IsPlayerAdmin(playerid)) return 0;
    if(
strcmp(cmdtext"/respawn_veh",true) == 0) {
        
SendClientMessage(playeridCOLOR_LIGHTBLUE"Info: Vehicles Respawn!!");
        new 
idx;
        new 
tmp[256];
        
tmp strtok(cmdtext,idx);
        
SetVehicleToRespawn(strval(tmp));
        return 
1;
    } 
Reply
#4

You should look at using zcmd and sscanf. It's super easy to work with, very simple compared to your old method.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)