help|error 017: undefined symbol "cmdtext" - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help|error 017: undefined symbol "cmdtext" (
/showthread.php?tid=90253)
help|error 017: undefined symbol "cmdtext" -
mao40 - 07.08.2009
im get this eror on my mod:
error 017: undefined symbol "cmdtext"
here the public:
Code:
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:current;
current = GetPlayerMenu(playerid);
if(current == TeleportMenu)
{
switch(row)
{
case 0:{
if(strcmp(cmdtext,"/ship",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"Pirate Ship",4000,6);
return SetVehiclePos(vehicleid,2029.1528,1545.3250,10.8203);
}
SetPlayerPos(playerid,2029.1528,1545.3250,10.8203);
GameTextForPlayer(playerid,"Pirate Ship",4000,6);
return 1;
}
}
}
}
return 1;
}
//You will have to sort the indentation out yourselfurn 1;
Re: help|error 017: undefined symbol "cmdtext" -
MadFlavor - 07.08.2009
this is only used in
if(strcmp(cmdtext,"/ship",true)==0)
OnPlayerCommandText
Re: help|error 017: undefined symbol "cmdtext" -
Abernethy - 07.08.2009
pawn Code:
// Use this?
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:current;
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
current = GetPlayerMenu(playerid);
if(current == TeleportMenu)
{
switch(row)
{
case 0:
{
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"Pirate Ship",4000,6);
SetVehiclePos(vehicleid,2029.1528,1545.3250,10.8203);
}
else
{
SetPlayerPos(playerid,2029.1528,1545.3250,10.8203);
GameTextForPlayer(playerid,"Pirate Ship",4000,6);
}
}
}
return 1;
}
Re: help|error 017: undefined symbol "cmdtext" -
mao40 - 07.08.2009
i fix this..
tnx for the help