21.05.2013, 06:01
Hi I want to arrange the gamemode a friend created for me ! And I want to transform the strcmp to cmd:asd
Here is the command :
and the erros is that
line 49816 is : car = strval(tmp);
How can I fix that ?
Here is the command :
pawn Код:
//=============================================================================================================================================================
CMD:vcar(playerid, params[])
{
new sendername[MAX_PLAYER_NAME],string[256];
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pVip] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, ""#GAlbastru"[Suceava-RPG]: {ffffff}Ne pare rau, dar nu ai acces la aceasta comanda.");
return 1;
}
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "» Scrie: /veh [carid] [color1] [color2]");
return 1;
}
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, ""#GAlbastru"[Suceava-RPG]: {ffffff}Ne pare rau, dar Vehiculele sunt intre 400 si 611."); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "» Scrie: /veh [carid] [color1] [color2]");
return 1;
}
new color1;
color1 = strval(tmp);
if(color1 < 0 || color1 > 200000000) { SendClientMessage(playerid, COLOR_GREY, ""#GAlbastru"[Suceava-RPG]: {ffffff}Ne pare rau, dar culorile sunt intre 0 si 126."); return 1; }
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "» Scrie: /veh [carid] [color1] [color2]");
return 1;
}
new color2;
color2 = strval(tmp);
if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, COLOR_GREY, ""#GAlbastru"[Suceava-RPG]: {ffffff}Ne pare rau, dar culorile sunt intre 0 si 126."); return 1; }
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 60000);
CreatedCars[CreatedCar] = carid;
CreatedCar ++;
MasinaSpawnata[carid] = 1;
format(string, sizeof(string), "» Vehicul [%d] Spawnat.", carid);
SendClientMessage(playerid, COLOR_GREY, string);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, ""#GAlbastru"[Suceava-RPG]: {ff6347} %s a spawnat %d [Vehicle].", sendername,car);
SendVIPMessage(0x9D9D4FFF, string);
}
return 1;
}
pawn Код:
D:\samp03\gamemodes\GameFront.pwn(49810) : error 017: undefined symbol "tmp"
D:\samp03\gamemodes\GameFront.pwn(49816) : error 017: undefined symbol "tmp"
D:\samp03\gamemodes\GameFront.pwn(49818) : error 017: undefined symbol "tmp"
D:\samp03\gamemodes\GameFront.pwn(49818) : error 017: undefined symbol "cmdtext"
D:\samp03\gamemodes\GameFront.pwn(49819) : error 017: undefined symbol "tmp"
D:\samp03\gamemodes\GameFront.pwn(49825) : error 017: undefined symbol "tmp"
D:\samp03\gamemodes\GameFront.pwn(49827) : error 017: undefined symbol "tmp"
D:\samp03\gamemodes\GameFront.pwn(49833) : error 017: undefined symbol "tmp"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
8 Errors.
How can I fix that ?