Tag MisMatch -
Windrush - 08.09.2012
Help Me please
pawn Код:
CMD:tune(playerid,params[])
{
{
if(isnull(params))
{
SendClientMessage(playerid, red, "Usage:/tune [1-4] To Teleport To The Tune Garages");
return 1;
}
if(strcmp(params,"1",true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //They are driving a vehicle
{
SetVehiclePos(GetPlayerVehicleID(playerid), -1935.985, 231.728, 34.1546);
}
else //They are on-foot or a passenger
{
SetPlayerPos(playerid, -1935.985, 231.728, 34.1546);
SendClientMessageToAll(playerid, yellow, "%s Has been teleported at Tune 1",dsname);
new dsname[MAX_PLAYER_NAME];
new string[128];
format(string, sizeof(string), "~B~You Teleported at ~R~Tune 1");
GameTextForPlayer(playerid, string, 3000, 4);
}
}
else if(strcmp(params,"2",true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //They are driving a vehicle
{
SetVehiclePos(GetPlayerVehicleID(playerid), -2709.731, 217.423, 4.179);
}
else //They are on-foot or a passenger
{
SetPlayerPos(playerid, -2709.731, 217.423, 4.179);
new dsname[MAX_PLAYER_NAME];
new string[128];
SendClientMessageToAll(playerid, yellow, "%s Has been teleported at Tune 2",dsname);
format(string, sizeof(string), "~B~You Teleported at ~r~Tune 2");
GameTextForPlayer(playerid, string, 3000, 4);
}
}
else if(strcmp(params,"3",true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //They are driving a vehicle
{
SetVehiclePos(GetPlayerVehicleID(playerid), 2386.802, 1036.320, 10.280);
}
else //They are on-foot or a passenger
{
SetPlayerPos(playerid, 2386.802, 1036.320, 10.280);
new dsname[MAX_PLAYER_NAME];
new string[128];
SendClientMessageToAll(playerid, yellow, "%s Has been teleported at Tune 3",dsname);
format(string, sizeof(string), "~B~You Teleported at ~R~Tune 3");
GameTextForPlayer(playerid, string, 3000, 4);
}
}
else if(strcmp(params,"4",true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //They are driving a vehicle
{
SetVehiclePos(GetPlayerVehicleID(playerid), 2644.976, -2030.903, 13.554);
}
else //They are on-foot or a passenger
{
SetPlayerPos(playerid, 2644.976, -2030.903, 13.554);
new dsname[MAX_PLAYER_NAME];
new string[128];
SendClientMessageToAll(playerid, yellow, "%s Has been teleported at Tune 4",dsname);
format(string, sizeof(string), "~B~You Teleported at ~R~Tune 4");
GameTextForPlayer(playerid, string, 3000, 4);
}
}
}
return 1;
}
pawn Код:
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(39378) : warning 204: symbol is assigned a value that is never used: "dsname"
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(39398) : error 035: argument type mismatch (argument 2)
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(39414) : error 035: argument type mismatch (argument 2)
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(39430) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
Re: Tag MisMatch -
Hyperfire - 08.09.2012
Код:
{
SetPlayerPos(playerid, -1935.985, 231.728, 34.1546);
SendClientMessageToAll(playerid, yellow, "%s Has been teleported at Tune 1",dsname);
new dsname[MAX_PLAYER_NAME];
new string[128];
format(string, sizeof(string), "~B~You Teleported at ~R~Tune 1");
GameTextForPlayer(playerid, string, 3000, 4);
}
Should be
Код:
{
new dsname[MAX_PLAYER_NAME];
new string[128];
SetPlayerPos(playerid, -1935.985, 231.728, 34.1546);
SendClientMessageToAll(playerid, yellow, "%s Has been teleported at Tune 1",dsname);
format(string, sizeof(string), "~B~You Teleported at ~R~Tune 1");
GameTextForPlayer(playerid, string, 3000, 4);
}
Thats for the error about dsname, not sure if it will fix that error, but its worth a try.
Can you indicate which lines give the type mismatch?
I'm new to pawno and also learn on the way.
Re: Tag MisMatch -
Windrush - 08.09.2012
The
Is The errors
Re: Tag MisMatch -
MarkoN - 08.09.2012
you need to format that and playerid shouldnt be there
pawn Код:
new msg[128];
format(msg, sizeof(msg), "%s Has been teleported at Tune 1",dsname);
SendClientMessageToAll(yellow, msg);
Re: Tag MisMatch -
Hyperfire - 08.09.2012
have you defined the "red" color?
Re: Tag MisMatch -
MarkoN - 08.09.2012
SendClientMessageToAll(playerid, yellow, "%s Has been teleported at Tune 1",dsname); is just plain WRONG!
delete that and use the method i showed you