SA-MP Forums Archive
Error Help. I dont see the problem? - 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: Error Help. I dont see the problem? (/showthread.php?tid=359724)



Error Help. I dont see the problem? - ArmandoRamiraz - 15.07.2012

I need some help with these errors. I understand the loose indention, and expected token. I just dont understand error 037.


Код:
C:\Users\Owner\Desktop\Raven's Roleplay 0.3d R2 V4.2\gamemodes\larp.pwn(4979) : error 037: invalid string (possibly non-terminated string)
C:\Users\Owner\Desktop\Raven's Roleplay 0.3d R2 V4.2\gamemodes\larp.pwn(4979) : warning 217: loose indentation
C:\Users\Owner\Desktop\Raven's Roleplay 0.3d R2 V4.2\gamemodes\larp.pwn(4979) : warning 215: expression has no effect
C:\Users\Owner\Desktop\Raven's Roleplay 0.3d R2 V4.2\gamemodes\larp.pwn(4979) : error 001: expected token: ";", but found ")"
C:\Users\Owner\Desktop\Raven's Roleplay 0.3d R2 V4.2\gamemodes\larp.pwn(4979) : error 029: invalid expression, assumed zero
C:\Users\Owner\Desktop\Raven's Roleplay 0.3d R2 V4.2\gamemodes\larp.pwn(4979) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Код:
dcmd_acheckcode(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] < 5)
	    return SendClientMessage(playerid, COLOR_GREY, "* You are not authorized to use this!!");

	new carid;
	new comment[64];
 	if(sscanf(params, "i", carid))
 	    return SendClientMessage(playerid,"Usage: \"/acheckcode <carid>\");

	if(IsAnOwnableCar(carid))
	{
	    format(comment, sizeof(comment),"* Car id %d code is %d",carid, CarInfo[carid][cCode]);
	}
	else
	{
		format(comment, sizeof(comment),"* Car id %d code is %d",carid, VehiclePass[carid]);
	}
	SendClientMessage(playerid, COLOR_GREY,comment);
	return 1;
}



Re: Error Help. I dont see the problem? - [MM]RoXoR[FS] - 15.07.2012

pawn Код:
return SendClientMessage(playerid,"Usage: \"/acheckcode <carid>\")";



Re: Error Help. I dont see the problem? - Avi57 - 15.07.2012

try this :
Код:
dcmd_acheckcode(playerid, params[])
{

    if(PlayerInfo[playerid][pAdmin] >= 5)
    return SendClientMessage(playerid, COLOR_GREY, "* You are not authorized to use this!!");

	new carid;
	new comment[64];
 	if(sscanf(params, "i", carid))
 	    return SendClientMessage(playerid,"Usage: \"/acheckcode <carid>\");

	if(IsAnOwnableCar(carid))
	{
	    format(comment, sizeof(comment),"* Car id %d code is %d",carid, CarInfo[carid][cCode]);
	}
	else
	{
		format(comment, sizeof(comment),"* Car id %d code is %d",carid, VehiclePass[carid]);
	}
	SendClientMessage(playerid, COLOR_GREY,comment);
	return 1;
}



Re: Error Help. I dont see the problem? - clarencecuzz - 15.07.2012

Quote:
Originally Posted by [MM]RoXoR[FS]
Посмотреть сообщение
pawn Код:
return SendClientMessage(playerid,"Usage: \"/acheckcode <carid>\")";
pawn Код:
return SendClientMessage(playerid,"Usage: \"/acheckcode <carid>\"");
??


Re: Error Help. I dont see the problem? - ArmandoRamiraz - 15.07.2012

Thanks I tried it and it works thanks alot.


Re: Error Help. I dont see the problem? - Avi57 - 15.07.2012

No problem and thx for rep