[HELP]Counter Strike Gamemode Errors. -
EgyptForLife - 03.02.2015
Hello everyone,
Well, I was working on my own CS Filterscript for my server, and I got these errors, while they work in the CTF Script(not mine, downloaded from forums), but when I create the cmds and OnPlayerDialogResponse, it give me 14 errors
Here are the errors:
Код:
C:\Users\SA-MP\Desktop\COD7ver3.0\filterscripts\CS.pwn(154) : error 049: invalid line continuation
C:\Users\SA-MP\Desktop\COD7ver3.0\filterscripts\CS.pwn(155) : error 055: start of function body without function header
C:\Users\SA-MP\Desktop\COD7ver3.0\filterscripts\CS.pwn(156) : error 010: invalid function or declaration
C:\Users\SA-MP\Desktop\COD7ver3.0\filterscripts\CS.pwn(160) : error 010: invalid function or declaration
C:\Users\SA-MP\Desktop\COD7ver3.0\filterscripts\CS.pwn(163) : error 010: invalid function or declaration
C:\Users\SA-MP\Desktop\COD7ver3.0\filterscripts\CS.pwn(171) : error 055: start of function body without function header
C:\Users\SA-MP\Desktop\COD7ver3.0\filterscripts\CS.pwn(172) : error 010: invalid function or declaration
C:\Users\SA-MP\Desktop\COD7ver3.0\filterscripts\CS.pwn(174) : error 010: invalid function or declaration
C:\Users\SA-MP\Desktop\COD7ver3.0\filterscripts\CS.pwn(176) : error 010: invalid function or declaration
C:\Users\SA-MP\Desktop\COD7ver3.0\filterscripts\CS.pwn(178) : error 010: invalid function or declaration
C:\Users\SA-MP\Desktop\COD7ver3.0\filterscripts\CS.pwn(180) : error 010: invalid function or declaration
C:\Users\SA-MP\Desktop\COD7ver3.0\filterscripts\CS.pwn(198) : error 010: invalid function or declaration
C:\Users\SA-MP\Desktop\COD7ver3.0\filterscripts\CS.pwn(219) : error 010: invalid function or declaration
C:\Users\SA-MP\Desktop\COD7ver3.0\filterscripts\CS.pwn(221) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
14 Errors.
And here are the script lines: [154~222]
pawn Код:
public OnPlayerCommandText(playeridm cndtext[]
{
if (strcmp("/cs", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Counter Strike, Choose a team!", "{0000FF}Counter Terrorists", "{FF0000}Terrorists", "Select");
SetPlayerVirtualWorld(playerid, 50);
return 1;
}
if (strcmp("/leavecs", cmdtextm true, 10) == 0)
{
ShowPlayerDialog(playerid, DIALOG_STYLE_MSGBOX, "Counter Strike, Leaving!", "{FF0000}You're about to leave Counter Strike, press OK to continue!", "Ok");
SetPlayerVirtualWorld(playerid, 50);
}
}
//=========================OnPlayerDialogResponse=============================\\
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case 1:
{
switch(listitem)
{
case 0:
{
GameTextForPlayer(playerid, "~b~Counter Terrorists~y~ ... ~b~Loading~y~...", 5000, 5);
SetPlayerPos(playerid,2579.6003,-1655.2416,2.2153);
SetPlayerFacingAngle(playerid, 176.6750);
SendClientMessage(playerid, -1, "{FF0000}Kill some {0066cc}Counter-{FFFF00}Terrorists{FFCC33}!");
SetPlayerSkin(playerid, 285);
SetPlayerColor(playerid, 0x0000FFFF);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerArmedWeapon(playerid,0);
GivePlayerWeapon(playerid, 24, 99999);
GivePlayerWeapon(playerid, 25, 99999);
GivePlayerWeapon(playerid, 31, 99999);
GivePlayerWeapon(playerid, 16, 99999);
SetPlayerCheckpoint(playerid, 2583.8486,-1926.6647,3.8594,3);
SetPlayerVirtualWorld(playerid, 99);
}
case 1:
{
GameTextForPlayer(playerid, "~r~Terrorists~y~ ... ~b~Loading~y~...", 5000, 5);
SetPlayerPos(playerid,2584.0322,-1932.2449,3.8594);
SetPlayerFacingAngle(playerid, 0.2667);
SendClientMessage(playerid, -1, "{FF0000}Kill some {FFFF00}Terrorists{FFCC33}!");
SetPlayerArmedWeapon(playerid,0);
GivePlayerWeapon(playerid, 24, 9999);
GivePlayerWeapon(playerid, 25, 9999);
GivePlayerWeapon(playerid, 30, 9999);
GivePlayerWeapon(playerid, 18, 9999);
SetPlayerSkin(playerid, 108);
SetPlayerColor(playerid, 0xFF0000C7);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerCheckpoint(playerid, 2578.6597,-1648.5959,2.3693,3);
SetPlayerVirtualWorld(playerid, 99);
}
}
}
}
return true;
}
return false;
}
Re: [HELP]Counter Strike Gamemode Errors. -
Matess - 03.02.2015
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])//
{
if (strcmp("/cs", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Counter Strike, Choose a team!", "{0000FF}Counter Terrorists", "{FF0000}Terrorists", "Select","");//
SetPlayerVirtualWorld(playerid, 50);
return 1;
}
if (strcmp("/leavecs", cmdtext, true, 10) == 0)//
{
ShowPlayerDialog(playerid,2, DIALOG_STYLE_MSGBOX, "Counter Strike, Leaving!", "{FF0000}You're about to leave Counter Strike, press OK to continue!", "Ok","");//
SetPlayerVirtualWorld(playerid, 50);
}
}
Re: [HELP]Counter Strike Gamemode Errors. -
EgyptForLife - 03.02.2015
Sorry about the typo :c I fixed it but still the same thing
here new lines: [153~222]
pawn Код:
//=========================Commands===========================================\\
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/cs", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Counter Strike, Choose a team!", "{0000FF}Counter Terrorists", "{FF0000}Terrorists", "Select");
SetPlayerVirtualWorld(playerid, 50);
return 1;
}
if (strcmp("/leavecs", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, DIALOG_STYLE_MSGBOX, "Counter Strike, Leaving!", "{FF0000}You're about to leave Counter Strike, press OK to continue!", "Ok");
SetPlayerVirtualWorld(playerid, 50);
}
}
//=========================OnPlayerDialogResponse=============================\\
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case 1:
{
switch(listitem)
{
case 0:
{
GameTextForPlayer(playerid, "~b~Counter Terrorists~y~ ... ~b~Loading~y~...", 5000, 5);
SetPlayerPos(playerid,2579.6003,-1655.2416,2.2153);
SetPlayerFacingAngle(playerid, 176.6750);
SendClientMessage(playerid, -1, "{FF0000}Kill some {0066cc}Counter-{FFFF00}Terrorists{FFCC33}!");
SetPlayerSkin(playerid, 285);
SetPlayerColor(playerid, 0x0000FFFF);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerArmedWeapon(playerid,0);
GivePlayerWeapon(playerid, 24, 99999);
GivePlayerWeapon(playerid, 25, 99999);
GivePlayerWeapon(playerid, 31, 99999);
GivePlayerWeapon(playerid, 16, 99999);
SetPlayerCheckpoint(playerid, 2583.8486,-1926.6647,3.8594,3);
SetPlayerVirtualWorld(playerid, 99);
}
case 1:
{
GameTextForPlayer(playerid, "~r~Terrorists~y~ ... ~b~Loading~y~...", 5000, 5);
SetPlayerPos(playerid,2584.0322,-1932.2449,3.8594);
SetPlayerFacingAngle(playerid, 0.2667);
SendClientMessage(playerid, -1, "{FF0000}Kill some {FFFF00}Terrorists{FFCC33}!");
SetPlayerArmedWeapon(playerid,0);
GivePlayerWeapon(playerid, 24, 9999);
GivePlayerWeapon(playerid, 25, 9999);
GivePlayerWeapon(playerid, 30, 9999);
GivePlayerWeapon(playerid, 18, 9999);
SetPlayerSkin(playerid, 108);
SetPlayerColor(playerid, 0xFF0000C7);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerCheckpoint(playerid, 2578.6597,-1648.5959,2.3693,3);
SetPlayerVirtualWorld(playerid, 99);
}
}
}
}
return true;
}
return false;
}
P.S: Can you use (pawn)(/pawn) instead of (php)(/php) pls.