Positioning help. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Positioning help. (
/showthread.php?tid=359677)
Positioning help. -
Blunt - 14.07.2012
Alright, so I'm not sure if I'm doing this right or not, but I'm pretty sure it's correct but it seems that I've got a tag-mismatch where I can't notice, if anyone has a solution to fix this or advice on a correct method, please comment here with your help.
Don't worry about the indentation, it messes up when you post it on these forums.
Command Line:
Код:
COMMAND:startcustomevent(playerid, params[])
{
new string[256], text[256];
if(sscanf(params, "s[256]", text)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /startcustomevent [Event Name]");
else
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
format(string, sizeof(string), "%s %s has started the %s event, private message an online administrator to participate.", GetAdminLvlName(playerid), GetName(playerid), text);
SendClientMessageToAll(COLOR_GREY, string);
foreach (Player, i)
{
EventInfo[i][ePosX] = X;
}
}
else SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You do not have access to this command");
}
return 1;
}
Error message:
Код:
C:\Users\Mike\Desktop\Scripting\gamemodes\nWo.pwn(2869) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Re: Positioning help. -
Captain_Mani - 15.07.2012
What is the line 2869?
Re: Positioning help. -
clarencecuzz - 15.07.2012
These warnings can be VERY annoying.
pawn Код:
COMMAND:startcustomevent(playerid, params[])
{
new string[256], text[256];
if(sscanf(params, "s[256]", text)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /startcustomevent [Event Name]");
else
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
format(string, sizeof(string), "%s %s has started the %s event, private message an online administrator to participate.", GetAdminLvlName(playerid), GetName(playerid), text);
SendClientMessageToAll(COLOR_GREY, string);
foreach (Player, i)
{
new str[15];
format(str, sizeof(str),"%d",X);
new stri = strval(str);
EventInfo[i][ePosX] = stri;
}
}
else SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You do not have access to this command");
}
return 1;
}
Re: Positioning help. -
ReneG - 15.07.2012
Just a heads up. Instead of wrapping your code in use [pawn][/pawn], that fixes any issues with indentation.