error 017: undefined symbol "tmp" -
Yves - 07.02.2013
hello am having this little issus error and also its a command it was DCMD i used a filterscript that converts DCMD to CMD and i added it to my script and now i get this error error 017: undefined symbol "tmp"
The command is here
Код:
CMD:gotobiz(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
new bull = strval(tmp);
if(bull <= 0 || bull > MAX_BUSINESSES)
{
return SendClientMessage(playerid, -1, "Invalid biz ID!");
}
new bleh[128];
format(bleh,sizeof(bleh),"Teleported to biz ID %d!",bull);
SendClientMessage(playerid, -1, bleh);
Teleport(playerid, BizzInfo[bull][bEntranceX], BizzInfo[bull][bEntranceY], BizzInfo[bull][bEntranceZ], 0.0, 0,0, 0);
return 1;
}
else
{
return SendClientMessage(playerid, -1, " You're not authorized to use that command!");
}
}
Re: error 017: undefined symbol "tmp" -
kaisersouse - 07.02.2013
new bull = strval(tmp);
try
new bull = strval(params);
Re: error 017: undefined symbol "tmp" -
Yves - 07.02.2013
Thank you sir it works good
Re: error 017: undefined symbol "tmp" -
kaisersouse - 07.02.2013
I ran into that too converting strcmp to dcmd. Still need to move to zcmd someday *sigh*
Re: error 017: undefined symbol "tmp" -
Yves - 07.02.2013
yea am getting a other error now
: error 017: undefined symbol "tmp"
: error 017: undefined symbol "cmd"
: error 017: undefined symbol "tmp"
: error 017: undefined symbol "businesstype"
Код:
CMD:bizfee(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new string[128];
new id = PlayerInfo[playerid][pPbiskey];
format( string, sizeof( string ), "Businesses/Business_%d.ini", id);
if(!dini_Exists(string))
{
SendClientMessage( playerid, COLOR_GREY, " You don't own a business !" );
return 1;
}
tmp = strtok(cmd, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bizfee [EntranceFee]");
}
if(BizzInfo[id][bType] > 0)
{
if(BizzInfo[id][bType] == 1) { businesstype = "24-7";}
else if(BizzInfo[id][bType] == 2) { businesstype = "Clothes Store";}
else if(BizzInfo[id][bType] == 3) { businesstype = "Club";}
else if(BizzInfo[id][bType] == 4) { businesstype = "Ammunation";}
else if(BizzInfo[id][bType] == 5) { businesstype = "Casino";}
else if(BizzInfo[id][bType] == 6) { businesstype = "Restaurant";}
else if(BizzInfo[id][bType] == 7) { businesstype = "Paintball";}
else if(BizzInfo[id][bType] == 8) { businesstype = "Bank";}
else if(BizzInfo[id][bType] == 9) { businesstype = "Electronic Store";}
else if(BizzInfo[id][bType] == 10) { businesstype = "Locks Store";}
else if(BizzInfo[id][bType] == 11) { businesstype = "Radio shop";}
}
else
{
businesstype = "Not Available";
}
if(strvalEx(tmp) < 0 || strvalEx(tmp) > 99999)
{
SendClientMessage(playerid, COLOR_WHITE, "Minimum entrance is $0, Maximum entrance is $99999.");
return 1;
}
format(string, sizeof(string), "{0000FF}[Business]{F0CC00}\nOwner: %s\n%s\nEntrance Fee: $%d\nID: %d", BizzInfo[id][bOwner], BizzInfo[id][bMessage],BizzInfo[id][bEntranceCost], id);
UpdateDynamic3DTextLabelText(business1[id], COLOR_DCHAT, string);
BizzInfo[id][bEntranceCost] = strvalEx(tmp);
format(string, sizeof(string), "Entrance fee set to $%d.", BizzInfo[id][bEntranceCost]);
SaveBusiness(id);
SendClientMessage(playerid, COLOR_WHITE, string);
}
return 1;
}
Re: error 017: undefined symbol "tmp" -
kaisersouse - 07.02.2013
You're going to run into this w/ every command you are converting. This may help:
https://sampforum.blast.hk/showthread.php?tid=231496
****** "samp strcmp to zcmd convert"
Re: error 017: undefined symbol "tmp" -
Yves - 07.02.2013
cmdtext to params
Thanks a lot you helpped