20.06.2011, 12:44
(
Последний раз редактировалось Dylan_Madigan69; 20.06.2011 в 13:07.
Причина: Add (code) and to have a solved/unsolved tag
)
This is a filther script i made
i get the errors
What did i do wrong?
Код:
#include <a_samp> new Menu:Menu500; new Menu:Menu501; new Menu:Menu502; new Menu:Menu503; new Menu:Menu504; public OnFilterScriptInit() { Menu500 = CreateMenu("Roadblock",1,10,150,300); //Creates the Menu SetMenuColumnHeader(Menu500, 0, "Select a Function"); //Sets the Title Above the Collumn AddMenuItem(Menu500,0,"Place"); //Adds an Item to a Menu AddMenuItem(Menu500,0,"Remove Set"); //Adds an Item to a Menu Menu501 = CreateMenu("Roablock",1,10,150,300); //Creates the Menu SetMenuColumnHeader(Menu501, 0, "Select Type"); //Sets the Title Above the Collumn AddMenuItem(Menu501,0,"Large (Highway)"); //Adds an Item to a Menu AddMenuItem(Menu501,0,"Medium (2-Laned Road)"); //Adds an Item to a Menu Menu502 = CreateMenu("Roadblock",1,10,150,300); //Creates the Menu SetMenuColumnHeader(Menu502, 0, "Select a set to Delete"); //Sets the Title Above the Collumn AddMenuItem(Menu502,0,"Set 1"); //Adds an Item to a Menu AddMenuItem(Menu502,0,"Set 2"); //Adds an Item to a Menu AddMenuItem(Menu502,0,"Set 3"); //Adds an Item to a Menu AddMenuItem(Menu502,0,"Set 4"); //Adds an Item to a Menu AddMenuItem(Menu502,0,"Set 5"); //Adds an Item to a Menu Menu503 = CreateMenu("Roadblock",1,10,150,300); //Creates the Menu SetMenuColumnHeader(Menu503, 0, "Select a set ID"); //Sets the Title Above the Collumn AddMenuItem(Menu503,0,"Set 1"); //Adds an Item to a Menu AddMenuItem(Menu503,0,"Set 2"); //Adds an Item to a Menu AddMenuItem(Menu503,0,"Set 3"); //Adds an Item to a Menu AddMenuItem(Menu503,0,"Set 4"); //Adds an Item to a Menu AddMenuItem(Menu503,0,"Set 5"); //Adds an Item to a Menu Menu504 = CreateMenu("Roadblock",1,10,150,300); //Creates the Menu SetMenuColumnHeader(Menu504, 0, "Select a set ID"); //Sets the Title Above the Collumn AddMenuItem(Menu504,0,"Set 1"); //Adds an Item to a Menu AddMenuItem(Menu504,0,"Set 2"); //Adds an Item to a Menu AddMenuItem(Menu504,0,"Set 3"); //Adds an Item to a Menu AddMenuItem(Menu504,0,"Set 4"); //Adds an Item to a Menu AddMenuItem(Menu504,0,"Set 5"); //Adds an Item to a Menu } public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/roadblock", true)) { { ShowMenuForPlayer(menu500, playerid); return 1; } public OnPlayerSelectedMenuRow(playerid, row) { if(Currentmenu == Menu500) // ROAD BLOCK { switch(row) { case 0: { ShowMenuForPlayer(menu501, playerid);//CREATE } case 1: { ShowMenuForPlayer(menu502, playerid);//DESTROY } } TogglePlayerControllable(playerid, 1); } if(Currentmenu == Menu501)//create { switch(row) { case 0: { ShowMenuForPlayer(menu503, playerid);//Large } case 1: { ShowMenuForPlayer(menu504, playerid);//Medium } } TogglePlayerControllable(playerid, 1); } if(Currentmenu == Menu502) // Delete a Set { switch(row) { case 0://set 1 { SendClientMessage(playerid, COLOR_WHITE, "Error"); } case 1://set 2 { SendClientMessage(playerid, COLOR_WHITE, "Error"); } case 2://set 3 { SendClientMessage(playerid, COLOR_WHITE, "Error"); } case 3://set 4 { SendClientMessage(playerid, COLOR_WHITE, "Error"); } case 4://set 5 { SendClientMessage(playerid, COLOR_WHITE, "Error"); } } TogglePlayerControllable(playerid, 1); } if(Currentmenu == Menu503) //medium new roadblockONE; new roadblockTWO; new roadblockTHREE; new roadblockFOUR; new roadblockFIVE; { switch(row) { case 0://set 1 { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); new Float:ang; GetPlayerFacingAngle(playerid, ang); roadblockONE = CreateObject(978, x, y, z-6, 0, 0, ang+180); MoveObject(roadblockONE, x, y, z, 1); SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #1)"); } case 1://set 2 { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); new Float:ang; GetPlayerFacingAngle(playerid, ang); roadblockTWO = CreateObject(978, x, y, z-6, 0, 0, ang+180); MoveObject(roadblockTWO, x, y, z, 1); SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #2)"); } case 2://set 3 { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); new Float:ang; GetPlayerFacingAngle(playerid, ang); roadblockTHREE = CreateObject(978, x, y, z-6, 0, 0, ang+180); MoveObject(roadblockTHREE, x, y, z, 1); SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #3)"); } case 3://set 4 { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); new Float:ang; GetPlayerFacingAngle(playerid, ang); roadblockFOUR = CreateObject(978, x, y, z-6, 0, 0, ang+180); MoveObject(roadblockFOUR, x, y, z, 1); SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #4)"); } case 4://set 5 { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); new Float:ang; GetPlayerFacingAngle(playerid, ang); roadblockFIVE = CreateObject(978, x, y, z-6, 0, 0, ang+180); MoveObject(roadblockFIVE, x, y, z, 1); SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #5)"); } } TogglePlayerControllable(playerid, 1); } if(Currentmenu == Menu504) // Medium new roadblockONEA; new roadblockTWOA; new roadblockTHREEA; new roadblockFOURA; new roadblockFIVEA; new roadblockONEB; new roadblockTWOB; new roadblockTHREEB; new roadblockFOURB; new roadblockFIVEB; { switch(row) { case 0://set 1 { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); new Float:ang; GetPlayerFacingAngle(playerid, ang); roadblockONEA = CreateObject(978, x, y, z-2.5, 0, 0, ang); MoveObject(roadblockONEA, x, y, z, 1); roadblockONEB = CreateObject(979, x, y, z-2.5, 0, 0, ang+180); MoveObject(roadblockONEB, x, y, z, 1); SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #1)"); } case 1://set 2 { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); new Float:ang; GetPlayerFacingAngle(playerid, ang); roadblockTWOA = CreateObject(978, x, y, z-2.5, 0, 0, ang); MoveObject(roadblockTWOA, x, y, z, 1); roadblockTWOB = CreateObject(979, x, y, z-2.5, 0, 0, ang+180); MoveObject(roadblockTWOB, x, y, z, 1); SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #2)"); } case 2://set 3 { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); new Float:ang; GetPlayerFacingAngle(playerid, ang); roadblockTHREEA = CreateObject(978, x, y, z-2.5, 0, 0, ang); MoveObject(roadblockTHREEA, x, y, z, 1); roadblockTHREEB = CreateObject(979, x, y, z-2.5, 0, 0, ang+180); MoveObject(roadblockTHREEB, x, y, z, 1); SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #3)"); } case 3://set 4 { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); new Float:ang; GetPlayerFacingAngle(playerid, ang); roadblockFOURA = CreateObject(978, x, y, z-2.5, 0, 0, ang); MoveObject(roadblockFOURA, x, y, z, 1); roadblockFOURB = CreateObject(979, x, y, z-2.5, 0, 0, ang+180); MoveObject(roadblockFOURB, x, y, z, 1); SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #4)"); } case 4://set 5 { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); new Float:ang; GetPlayerFacingAngle(playerid, ang); roadblockFIVEA = CreateObject(978, x, y, z-2.5, 0, 0, ang); MoveObject(roadblockFIVEA, x, y, z, 1); roadblockFIVEB = CreateObject(979, x, y, z-2.5, 0, 0, ang+180); MoveObject(roadblockFIVEB, x, y, z, 1); SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #5)"); } } TogglePlayerControllable(playerid, 1); } return 0; }
Код:
C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(52) : error 017: undefined symbol "menu500" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(57) : warning 225: unreachable code C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(57) : warning 217: loose indentation C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(57) : error 029: invalid expression, assumed zero C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(57) : error 004: function "OnPlayerSelectedMenuRow" is not implemented C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(60) : error 017: undefined symbol "Currentmenu" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(62) : error 017: undefined symbol "row" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(66) : error 017: undefined symbol "menu501" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(72) : error 017: undefined symbol "menu502" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(77) : warning 217: loose indentation C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(80) : error 017: undefined symbol "Currentmenu" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(82) : error 017: undefined symbol "row" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(86) : error 017: undefined symbol "menu503" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(92) : error 017: undefined symbol "menu504" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(97) : warning 217: loose indentation C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(99) : error 017: undefined symbol "Currentmenu" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(101) : error 017: undefined symbol "row" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(105) : error 017: undefined symbol "COLOR_WHITE" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(111) : error 017: undefined symbol "COLOR_WHITE" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(116) : error 017: undefined symbol "COLOR_WHITE" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(121) : error 017: undefined symbol "COLOR_WHITE" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(126) : error 017: undefined symbol "COLOR_WHITE" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(131) : warning 217: loose indentation C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(133) : warning 217: loose indentation C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(133) : error 017: undefined symbol "Currentmenu" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(134) : error 003: declaration of a local variable must appear in a compound block C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(134) : warning 217: loose indentation C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(134) : error 017: undefined symbol "roadblockONE" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(134) : warning 215: expression has no effect C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(140) : error 017: undefined symbol "row" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(149) : error 017: undefined symbol "roadblockONE" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(150) : error 017: undefined symbol "roadblockONE" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(152) : error 017: undefined symbol "COLOR_GREY" C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\menutest.pwn(164) : error 017: undefined symbol "COLOR_GREY" Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 26 Errors.