error 036: empty statement
#6

Quote:
Originally Posted by __
Посмотреть сообщение
Show us your command code for "givedrugmats" and "givewepmats" as with dcmd, the code for 'dcmd(...);' is actually once compiled turned in to your command.
Here it is All of it.
Quote:

dcmd_givedrugmats(playerid, params[]){
new id, drugmatamount, idname[30];
if (sscanf(params, "ui", id, drugmatamount))SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/givedrugmats <playerid> <amount>\"");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else{
//=====GIVING STRING DRUG MATS=====
PlayerStats[id][PDrugMats] += drugmatamount;
new drugmats[30];
format(drugmats,sizeof(drugmats),"You recieved %i drug material(s).",drugmatamount);
SendClientMessage(id, 0x00FF00AA, drugmats);
new drugmats2[30];
format(drugmats2,sizeof(drugmats2),"You gave %s %i drug material(s).",GetPlayerName(id,idname,sizeof(idnam e)),drugmatamount);
SendClientMessage(playerid, 0x00FF00AA,drugmats2);
}
return 1;
}

//new WepNumber;

dcmd_givewepmats(playerid, params[]){
new id, wepmatamount, idname[30];
if (sscanf(params, "ui", id, wepmatamount))SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/givewepmats <playerid> <amount>\"");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else{
//=====GIVING STRING WEAPON MATS=====
PlayerStats[playerid][PWepMats] = wepmatamount;
new wepmats[30];
format(wepmats,sizeof(wepmats),"You recieved %i weapon material(s).",wepmatamount);
SendClientMessage(id, 0x00FF00AA, wepmats);
new wepmats2[30];
format(wepmats2,sizeof(wepmats2),"You gave %s %i weapon matierial(s).",GetPlayerName(id,idname,sizeof(idna me)),wepmatamount);
SendClientMessage(playerid, 0x00FF00AA, wepmats2);
}
return 1;
}


dcmd(givedrugmats, 12, cmdtext);
dcmd(givewepmats, 11, cmdtext);

If anyone knows why when i added the brackets as the other person stated it ran and it showed the first if, but the last else didn't show up when i entered the command correctly, any solution(never check the else if INVALID_PLAYER_ID command)?
Reply


Messages In This Thread
error 036: empty statement - by BeEasy114 - 13.05.2011, 05:54
Re: error 036: empty statement - by __ - 13.05.2011, 09:38
Re: error 036: empty statement - by Lorenc_ - 13.05.2011, 09:40
Re: error 036: empty statement - by __ - 13.05.2011, 09:42
Re: error 036: empty statement - by Vince - 13.05.2011, 14:02
Re: error 036: empty statement - by BeEasy114 - 13.05.2011, 17:32
Re: error 036: empty statement - by BeEasy114 - 13.05.2011, 17:35
Re: error 036: empty statement - by BeEasy114 - 13.05.2011, 17:43

Forum Jump:


Users browsing this thread: 1 Guest(s)