30.07.2011, 02:39
I'm trying to make these commands and keep getting errors. Help please?
Here are the errors I'm receiving.
If you can't help, Then thanks for reading anyway.
I understand if my scripting is a bit weird\noob-ish.
Pastebin link if you need any further observations. http://pastebin.com/JADC2YuU
Code:
public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(kill, 4, cmdtext); dcmd(help, 4, cmdtext); dcmd(commands, 8, cmdtext); dcmd(rules, 5, cmdtext); dcmd(report, 6, cmdtext); return 0; } //------------------------------------------------------------------------------ dcmd_kill(playerid, cmdtext[]) { #pragma unused cmdtext SetPlayerHealth( playerid, 0 ); return 1; { dcmd_help(playerid, cmdtext[]) { #pragma unused cmdtext SendClientMessage(playerid, COLOR_RED,"V.M.S. (ViViD's Movie Server)"); SendClientMessage(playerid, COLOR_GREEN,"This is a movie gamemode where you can make movies, free roam, etc. Whatever you feel like doing!"); SendClientMessage(playerid, COLOR_GREEN,"There is no real objective to this gamemode."); SendClientMessage(playerid, COLOR_RED,"See a rulebreaker or cheater? Use /report <id> <reason>. And see your teams stats: /teamstats (teamid)"); SendClientMessage(playerid, COLOR_YELLOW,"You can see the server rules under /rules."); SendClientMessage(playerid, COLOR_ORANGE,"Type /commands for a full list of commands."); return 1; } dcmd_rules(playerid, cmdtext[]) { #pragma unused cmdtext SendClientMessage(playerid, COLOR_RED,"V.M.S. (ViViD's Movie Server) Rules."); SendClientMessage(playerid, COLOR_YELLOW,"If a rule is shown as red then you will be instantly banned for breaking it"); SendClientMessage(playerid, COLOR_RED,"1. No cheating/hacking. Camhack is allowed."); SendClientMessage(playerid, COLOR_RED,"2. No bug abuse."); SendClientMessage(playerid, COLOR_YELLOW,"3. Obey the admins and be respectful"); SendClientMessage(playerid, COLOR_YELLOW,"4. Don't ask if you can become an admin."); SendClientMessage(playerid, COLOR_YELLOW,"5. Don't abuse or spam any type of commands."); SendClientMessage(playerid, COLOR_YELLOW,"6. Don't kill random people"); SendClientMessage(playerid, COLOR_RED,"7. Don't spawn cars near the spawn area."); SendClientMessage(playerid, COLOR_YELLOW,"8. Don't camp in the spawn area"); SendClientMessage(playerid, COLOR_YELLOW,"9. Do not run people over with your car."); SendClientMessage(playerid, COLOR_GREEN,"10. What admins say will always be final"); return 1; } dcmd_report(playerid, text[]) { if(strlen(text) > 0) { new string[256], playername[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername, sizeof(playername)); format(string, sizeof(string), "*****Report from %s(%d): %s", playername, playerid, text[0]);
Quote:
C:\*****\*****\*****\*****\gamemodes\VIVIDsMovieSe rver.pwn(413) : error 017: undefined symbol "dcmd_help" C:\Users\*****\*****\*****\gamemodes\VIVIDsMovieSe rver.pwn(414) : error 017: undefined symbol "dcmd_commands" C:\Users\*****\*****\*****\gamemodes\VIVIDsMovieSe rver.pwn(415) : error 017: undefined symbol "dcmd_rules" C:\Users\*****\*****\*****\gamemodes\VIVIDsMovieSe rver.pwn(416) : error 017: undefined symbol "dcmd_report" C:\Users\*****\*****\*****\gamemodes\VIVIDsMovieSe rver.pwn(424) : warning 225: unreachable code C:\Users\*****\*****\*****\gamemodes\VIVIDsMovieSe rver.pwn(424) : warning 217: loose indentation C:\Users\*****\*****\*****\gamemodes\VIVIDsMovieSe rver.pwn(425) : error 017: undefined symbol "dcmd_help" C:\Users\*****\*****\ *****\gamemodes\VIVIDsMovieServer.pwn(435) : warning 225: unreachable code C:\Users\*****\*****\*****\gamemodes\VIVIDsMovieSe rver.pwn(435) : error 017: undefined symbol "dcmd_rules" C:\Users\*****\*****\*****\gamemodes\VIVIDsMovieSe rver.pwn(452) : warning 225: unreachable code C:\Users\*****\*****\gamemodes\VIVIDsMovieServer.p wn(452) : error 017: undefined symbol "dcmd_report" C:\Users\*****\*****\*****\gamemodes\VIVIDsMovieSe rver.pwn(453) : error 017: undefined symbol "text" C:\Users\*****\*****\*****\gamemodes\VIVIDsMovieSe rver.pwn(456) : error 017: undefined symbol "text" C:\Users\*****\*****\*****\gamemodes\VIVIDsMovieSe rver.pwn(456) : warning 215: expression has no effect C:\Users\*****\*****\*****\gamemodes\VIVIDsMovieSe rver.pwn(456) : error 001: expected token: ";", but found "]" C:\Users\*****\*****\*****r\gamemodes\VIVIDsMovieS erver.pwn(456) : error 029: invalid expression, assumed zero C:\Users\*****\*****\*****\gamemodes\VIVIDsMovieSe rver.pwn(456) : fatal error 107: too many error messages on one line |
If you can't help, Then thanks for reading anyway.
I understand if my scripting is a bit weird\noob-ish.
Pastebin link if you need any further observations. http://pastebin.com/JADC2YuU