14.01.2010, 08:44
Ok, this is my first major attempt at filterscripting.
I have successfully made an island and added dcmd commands to open gates, fixing errors using the forum's search feature (it works wonders!).
However, I'm now writing a dcmd 'jail' command (/j [id] [cell]) but get these warnings (which also prevent the /j command from working correctly at all) and have found no useful help searching the forum...
Here is my code (the sections relevant to the error).
I constructed the if() statement the way I did so that I have less to worry as far as determining what cell they should go into.
(If the user types 1||2||3||4 then the X is one side; 5||6||7||8 is the other side)
(If the user types 1||5 then the Y is row one; 2||6 is row two; 3||7 is row three; 4||8 is row four)
X is static, the same with every cell.
Here is a crappy attempt at screenshotting my objects to give you an idea of where it should move them.
My guess is it is something related to the way xxx, yyy, and zzz are defined.
All help is greatly appreciated!
~Chris
I have successfully made an island and added dcmd commands to open gates, fixing errors using the forum's search feature (it works wonders!).
However, I'm now writing a dcmd 'jail' command (/j [id] [cell]) but get these warnings (which also prevent the /j command from working correctly at all) and have found no useful help searching the forum...
Код:
C:\Users\Chris\Desktop\Gaming\sampSrv\filterscripts\fs1.pwn(615) : warning 213: tag mismatch C:\Users\Chris\Desktop\Gaming\sampSrv\filterscripts\fs1.pwn(619) : warning 213: tag mismatch C:\Users\Chris\Desktop\Gaming\sampSrv\filterscripts\fs1.pwn(623) : warning 213: tag mismatch C:\Users\Chris\Desktop\Gaming\sampSrv\filterscripts\fs1.pwn(627) : warning 213: tag mismatch C:\Users\Chris\Desktop\Gaming\sampSrv\filterscripts\fs1.pwn(631) : warning 213: tag mismatch C:\Users\Chris\Desktop\Gaming\sampSrv\filterscripts\fs1.pwn(635) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Warnings.
Код:
new xxx,yyy,zzz; //these are at the very top of my new playname; //script under #define FILTERSCRIPT
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(j,1,cmdtext); }
Код:
dcmd_j(playerid, params[]) { #pragma unused params if(IsPlayerAdmin(playerid)) { if(params[1] == 1 || params[1] == 2 || params[1] == 3 || params[1] == 4) { xxx = 853.75; //615 } else if(params[1] == 5 || params[1] == 6 || params[1] == 7 || params[1] == 8) { xxx = 819.25; //619 } if(params[1] == 1 || params[1] == 5) { yyy = -2245.5; //623 } else if(params[1] == 2 || params[1] == 6) { yyy = -2268.5; //627 } else if(params[1] == 3 || params[1] == 7) { yyy = -2291.5; //631 } else if(params[1] == 4 || params[1] == 8) { yyy = -2314.5; //635 } zzz = 15; SetPlayerPos(params[0],xxx,yyy,zzz); new string[100]; GetPlayerName(params[0],playname,64); format(string, sizeof(string),"You have jailed %s.", playname); SendClientMessage(playerid,0x00bb00FF,string); GetPlayerName(playerid,playname,64); format(string, sizeof(string),"%s has jailed you!", playname); SendClientMessage(params[1],0xbb0000FF,string); } return 1; }
(If the user types 1||2||3||4 then the X is one side; 5||6||7||8 is the other side)
(If the user types 1||5 then the Y is row one; 2||6 is row two; 3||7 is row three; 4||8 is row four)
X is static, the same with every cell.
Here is a crappy attempt at screenshotting my objects to give you an idea of where it should move them.
My guess is it is something related to the way xxx, yyy, and zzz are defined.
All help is greatly appreciated!
~Chris