Compile error - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Compile error (
/showthread.php?tid=511207)
Compile error -
DaYviSoN - 04.05.2014
Error:
PHP код:
C:\Users\Bruno\Desktop\CoD-Rivals\CoD-Rivals\gamemodes\CoD-R.pwn(166) : error 017: undefined symbol "idx"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB 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;
}
Re: Compile error -
iZN - 04.05.2014
The error is obvious.
Re: Compile error -
DaYviSoN - 04.05.2014
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(playerid, COLOR_LIGHTBLUE, "Info: Vehicles Respawn!!");
new idx;
new tmp[256];
tmp = strtok(cmdtext,idx);
SetVehicleToRespawn(strval(tmp));
return 1;
}
Re: Compile error -
SMCentral - 04.05.2014
You should look at using zcmd and sscanf. It's super easy to work with, very simple compared to your old method.