Errors :S
#1

i get this error:
error 001: expected token: "-string end-", but found "-identifier-"

What Does it Mean? :S
Reply
#2

You're probally missing a " somewhere in your script
Reply
#3

post the line where is the error and check for this " or ; or idk u are missing there something little but it made the crapy error
Reply
#4

Quote:
Originally Posted by Lajko1
post the line where is the error and check for this " or ; or idk u are missing there something little but it made the crapy error
This is the line:

Код:
		case "pd":
Reply
#5

If your switch isn't a string var, you can't use strings as cases AFAIK
Reply
#6

Quote:
Originally Posted by lrZ^ aka LarzI
If your switch isn't a string var, you can't use strings as cases AFAIK
This is the whole command At all the 'case' i get this error :S
Код:
dcmd_gps(playerid, params[])
{
	if(!strlen(params))
    	return SendClientMessage(playerid, COLOR_GREY, "For al the locations use: /gpslocations");

 	switch(params)
	{
		case "pd":
		{
			SetPlayerCheckpoint(playerid,1541.3068,-1675.2467,13.5523,6.0);
			SendClientMessage(playerid, COLOR_RED, ".:GPS:. Checkpoint Set on: Police Department");
		}
		case "airport":
		{
			SetPlayerCheckpoint(playerid,1961.7820,-2184.5918,13.5469,6.0);
			SendClientMessage(playerid, COLOR_RED, ".:GPS:. Checkpoint Set on: Los Santos Airport");
		}
		case "bank":
		{
			SetPlayerCheckpoint(playerid,1422.4249,-1696.0032,13.5469,6.0);
			SendClientMessage(playerid, COLOR_RED, ".:GPS:. Checkpoint Set on: Bank of Los Santos");
		}
		case "ammunation":
		{
			SetPlayerCheckpoint(playerid,1365.5531,-1279.8724,13.5469,6.0);
			SendClientMessage(playerid, COLOR_RED, ".:GPS:. Checkpoint Set on: Ammunation Los Santos");
		}
		case "spawn":
		{
			SetPlayerCheckpoint(playerid,1761.1202,-1895.1223,13.5613,6.0);
			SendClientMessage(playerid, COLOR_RED, ".:GPS:. Checkpoint Set on: Noob Spawn");
		}
		case "cityhall":
		{
			SetPlayerCheckpoint(playerid,1487.2035,-1750.3798,15.4453,6.0);
			SendClientMessage(playerid, COLOR_RED, ".:GPS:. Checkpoint Set on: Cityhall Of Los Santos");
		}
		case "pier":
		{
			SetPlayerCheckpoint(playerid,835.8881,-2042.4478,12.8672,6.0);
			SendClientMessage(playerid, COLOR_RED, ".:GPS:. Checkpoint Set on: The Pier");
		}
	}
	return 1;
}
Reply
#7

You can't use strings with switchs at all I think.
You will be better using strcmp and else ifs.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)