02.09.2011, 21:55
Hi everyone,
I am a new scripter to let everyone know so go a little easy on me . I am trying to script a DM server from scratch but seem to be having trouble. I am just asking for some help because I seem to be getting some errors and I do not know how to fix them. I will list them below and show you guys the code I have enetered. Thanks for all the help!
Now here is all the code I have for each of them:
Lines 68-117
Hope this will help you guys to help me. If you need individual lines let me know and I'll post them for you!
I am a new scripter to let everyone know so go a little easy on me . I am trying to script a DM server from scratch but seem to be having trouble. I am just asking for some help because I seem to be getting some errors and I do not know how to fix them. I will list them below and show you guys the code I have enetered. Thanks for all the help!
pawn Код:
C:\Users\Tony\Desktop\DM SERVER\gamemodes\DM-Server.pwn(68) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Tony\Desktop\DM SERVER\gamemodes\DM-Server.pwn(71) : error 017: undefined symbol "COL_GREY"
C:\Users\Tony\Desktop\DM SERVER\gamemodes\DM-Server.pwn(73) : error 001: expected token: ";", but found ")"
C:\Users\Tony\Desktop\DM SERVER\gamemodes\DM-Server.pwn(74) : error 029: invalid expression, assumed zero
C:\Users\Tony\Desktop\DM SERVER\gamemodes\DM-Server.pwn(75) : error 035: argument type mismatch (argument 2)
C:\Users\Tony\Desktop\DM SERVER\gamemodes\DM-Server.pwn(78) : error 021: symbol already defined: "SendClientMessage"
C:\Users\Tony\Desktop\DM SERVER\gamemodes\DM-Server.pwn(85) : error 010: invalid function or declaration
C:\Users\Tony\Desktop\DM SERVER\gamemodes\DM-Server.pwn(90) : error 010: invalid function or declaration
C:\Users\Tony\Desktop\DM SERVER\gamemodes\DM-Server.pwn(94) : error 010: invalid function or declaration
C:\Users\Tony\Desktop\DM SERVER\gamemodes\DM-Server.pwn(99) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Tony\Desktop\DM SERVER\gamemodes\DM-Server.pwn(99) : error 017: undefined symbol "string"
C:\Users\Tony\Desktop\DM SERVER\gamemodes\DM-Server.pwn(99) : error 029: invalid expression, assumed zero
C:\Users\Tony\Desktop\DM SERVER\gamemodes\DM-Server.pwn(99) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
12 Errors.
Now here is all the code I have for each of them:
Lines 68-117
pawn Код:
new pname[MAX_PLAYER_NAME], string[256 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "[JOIN] %s has joined the server", pname);
SendClientMessageToAll(COL_SGRAY, string);
for(new chat= 0; chat <= 100, chat++)
}
SendClientMessage(playerid,COL_BLACK," ");
}
SendClientMessage(playerid,COL_BLACK,""#COL_LOGIN"=================================================================================================
SendClientMessage(playerid,COL_BLACK,""#COL_LOGIN" DeathMatch Game Mode Created By "#COL_RED"Phoenix_Roleplay. ");
SendClientMessage(playerid,COL_BLACK,""#COL_LOGIN" Any Questions, Comments, or Bugs, report them to "#COL_RED"Phoenix_Roleplay. ");
SendClientMessage(playerid,COL_BLACK,""#COL_LOGIN" Credit are going to Kush for his tutorial, and Phoenix_Roleplay for creating this gamemode. ");
SendClientMessage(playerid,COL_BLACK,""#COL_LOGIN" Version 3.0 and the last update was "#COL_CYAN"9/2/2011
SendClientMessage(playerid,COL_BLACK,""#COL_LOGIN"=================================================================================================
if(fexist(UserPath(playerid)))
{
(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""#COL_RED":: "#COL_WHITE"Login", "\t\t"#COL_ORANGE"DM SERVER "#COL_BLUE"Y_INI "#COL_DYELLOW"(V2)\n\n"#COL_WHITE"Welcome back, \nPlease enter your password below to join the game!", "Login", "Exit");
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""#COL_RED":: "#COL_WHITE"Register" , "\t\t"#COL_ORANGE"DM SERVER "#COL_BLUE"Y_INI "#COL_DYELLOW"(V2)\n\n"#COL_WHITE"You are not registered with this server, \nPlease enter a password below to register your account!", "Register", "Exit");
}
return 1;
}
public OnPlayerSpawn(playerid)
{
new pname [MAX_PLAYER_NAME] string(39 + MAX_PLAYER_NAME];
GetPlayerName (playerid, pname, sizeof(pname));
switch(reason)
{
case 0 format (string, sizeof(string), "[LEFT SERVER] %s has left the server. (TimedOut)", pname);
case 1 format (string, sizeof(string), "[LEFT SERVER] %s has left the server. (Quit, Used /q or ESC Menu)", pname);
case 2 format (string, sizeof(string), "[LEFT SERVER] %s has left the server. (Kicked/Banned)", pname);
}
SendClientMessageToAll(COL_BLACK, string);
new INI:File = INI_OPEN(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash"GetPlayerMoney(playerid));
INI_WriteInt(File,"Kills"PlayerInfo(playerid));
INI_WriteInt(File,"Deaths"PlayerInfo(playerid));
INI_WriteInt(File,"AdminLevel"PlayerInfo(playerid));
INI_Close(File);
return 1;
}