[Tutorial] Making a /me /do /shout /b command
#21

In your '/do' command You've a small problem there i believe.

Quote:

CMD:do(playerid, params[])
{
new, string[128], action[100];
if(sscanf(params, "s[100]", action))
{
SendClientMessage(playerid, -1, "USAGE: /do [action]");
return 1;
}
else
{
format(string, sizeof(string), "* %s (( %s ))", action, GetName(playerid));
ProxDetector(30, playerid, string, COLOR_PURPLE);
}
return 1;
}

You should remove that ',' (Comma) after the 'new' if you didn't remove it you'll get these errors

Quote:

D:\Mido & Mohaned\Mohaned\Windows Scripting2\gamemodes\Untitled.pwn(337) : error 001: expected token: "-identifier-", but found ","
D:\Mido & Mohaned\Mohaned\Windows Scripting2\gamemodes\Untitled.pwn(33 : error 017: undefined symbol "action"
D:\Mido & Mohaned\Mohaned\Windows Scripting2\gamemodes\Untitled.pwn(345) : error 017: undefined symbol "string"
D:\Mido & Mohaned\Mohaned\Windows Scripting2\gamemodes\Untitled.pwn(345) : error 017: undefined symbol "string"
D:\Mido & Mohaned\Mohaned\Windows Scripting2\gamemodes\Untitled.pwn(345) : error 029: invalid expression, assumed zero
D:\Mido & Mohaned\Mohaned\Windows Scripting2\gamemodes\Untitled.pwn(345) : fatal error 107: too many error messages on one line


So the correct 'do' is the following

Quote:

CMD:do(playerid, params[])
{
new string[128], action[100];
if(sscanf(params, "s[100]", action))
{
SendClientMessage(playerid, -1, "USAGE: /do [action]");
return 1;
}
else
{
format(string, sizeof(string), "* %s (( %s ))", action, GetName(playerid));
ProxDetector(30, playerid, string, COLOR_PURPLE);
}
return 1;
}

Reply


Messages In This Thread
Making a /me /do /shout /b command - by Blademaster680 - 16.10.2013, 09:13
Re: Making a /me /do /shout /b command - by DemME - 21.12.2013, 00:09
Re: Making a /me /do /shout /b command - by Blademaster680 - 22.12.2013, 17:12
Re: Making a /me /do /shout /b command - by Emmet_ - 22.12.2013, 18:44
Re: Making a /me /do /shout /b command - by Hansrutger - 22.12.2013, 18:57
Re : Making a /me /do /shout /b command - by anou1 - 16.01.2014, 21:15
Re: Re : Making a /me /do /shout /b command - by Blademaster680 - 17.01.2014, 05:43
Re: Making a /me /do /shout /b command - by Guest4390857394857 - 23.02.2014, 10:38
Re: Making a /me /do /shout /b command - by NL-Sultan - 23.02.2014, 14:09
Re: Making a /me /do /shout /b command - by Blademaster680 - 25.02.2014, 07:10
Re: Making a /me /do /shout /b command - by Crayder - 26.02.2014, 02:56
Re: Making a /me /do /shout /b command - by Blademaster680 - 11.03.2014, 10:49
Re: Making a /me /do /shout /b command - by JacobEdwards - 11.03.2014, 20:37
Re: Making a /me /do /shout /b command - by Blademaster680 - 12.03.2014, 17:25
Re: Making a /me /do /shout /b command - by Simou - 14.03.2014, 12:50
Re: Making a /me /do /shout /b command - by IcanBreakCuffs - 06.05.2014, 17:33
Re: Making a /me /do /shout /b command - by Blademaster680 - 07.05.2014, 20:18
Re: Making a /me /do /shout /b command - by IcanBreakCuffs - 07.05.2014, 21:05
Re: Making a /me /do /shout /b command - by Andreas1331 - 16.05.2014, 19:58
Re: Making a /me /do /shout /b command - by Blademaster680 - 24.05.2014, 07:46
Re: Making a /me /do /shout /b command - by Object - 30.05.2014, 21:45
Re: Making a /me /do /shout /b command - by ZcvDev - 29.01.2015, 11:09
Re: Making a /me /do /shout /b command - by Blademaster680 - 30.01.2015, 23:09
Re: Making a /me /do /shout /b command - by ZcvDev - 31.01.2015, 12:51

Forum Jump:


Users browsing this thread: 5 Guest(s)