30.05.2014, 21:45
In your '/do' command You've a small problem there i believe.
You should remove that ',' (Comma) after the 'new' if you didn't remove it you'll get these errors
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; } |
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; } |