SA-MP Forums Archive
Script error. - 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: Script error. (/showthread.php?tid=528867)



Script error. - SpikeSpigel - 30.07.2014

I try to make my Roleplay server and i received that.. can you help me ?

Error:
Quote:

C:\Users\Cristian\Desktop\UG-RP\gamemodes\UNRP.pwn(51) : error 029: invalid expression, assumed zero
C:\Users\Cristian\Desktop\UG-RP\gamemodes\UNRP.pwn(51) : warning 215: expression has no effect
C:\Users\Cristian\Desktop\UG-RP\gamemodes\UNRP.pwn(51) : error 001: expected token: ";", but found "]"
C:\Users\Cristian\Desktop\UG-RP\gamemodes\UNRP.pwn(51) : error 029: invalid expression, assumed zero
C:\Users\Cristian\Desktop\UG-RP\gamemodes\UNRP.pwn(51) : fatal error 107: too many error messages on one line

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


4 Errors.

SCRIPT
Quote:

CMD:me(playerid, params[])
{
new string[126];
if(isnull(params))
return SendClientMessage(playerid, -1, "SYNTAX: /me [action]");

format(string, sizeof(string), "* %s %s", GetName(playerid), params);
NearbyMessage(playerid, -1, string);

return 1;
}

CMD:do(playerid, params[])
{
new pName[MAX_PLAYER_NAME], string[126];
GetPlayerName(playerid, pName, sizeof(pName));

if(isnull(params))
return SendClientMessage(playerid, -1, "SYNTAX: /do [ooc action]");

format(string, sizeof(string), "* %s (( %s ))", params, pName);
NearbyMessage(playerid, -1, string);

return 1;
}




Re: Script error. - TFreemen - 30.07.2014

Which is line 51?


Re: Script error. - SpikeSpigel - 30.07.2014

sorry ! first i typed : } )
line 51 is: new string[126];


Re: Script error. - TFreemen - 30.07.2014

Код:
CMD:me(playerid, params[])
{
	if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /me [action]");
	new string[128];
	format(string, sizeof(string), "* %s %s", GetName(playerid), params);
	PNearbyMessage(playerid, -1, string);
	return 1;
}
CMD:do(playerid, params[])
{
	if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /do [action]");
	new string[150];
	format(string, sizeof(string), "* %s (( %s ))", params, GetName(playerid));
	NearbyMessage(playerid, -1, string);
	return 1;
}



Re: Script error. - SpikeSpigel - 30.07.2014

Same errors.. But.. thank you for your help. I try to repair that.. That worked for you ?


Re: Script error. - Clad - 30.07.2014

pawn Код:
CMD:me(playerid, params[])
{
    if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "SYNTAX: /do [ooc action]");
    new string[128];
    format(string, sizeof(string), "* %s %s", GetName(playerid), params);
        NearbyMessage(playerid, -1, string);
    return 1;
}
pawn Код:
CMD:do(playerid, params[])
{
    new string[126], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /do [action]");

    format(string, sizeof(string), "* %s (( %s ))", params, pName);
    NearbyMessage(playerid, -1, string);

    return 1;
}



Re: Script error. - SpikeSpigel - 30.07.2014

Aww, same error


Re: Script error. - TFreemen - 30.07.2014

Try my code again.I`ve edited it.


Re: Script error. - SpikeSpigel - 30.07.2014

Wow.. it's really hard.. i try your script, clad script, my script and that really don't want to work..

Код:
C:\Users\Cristian\Desktop\UG-RP\gamemodes\UNRP.pwn(52) : error 001: expected token: "-identifier-", but found "["
C:\Users\Cristian\Desktop\UG-RP\gamemodes\UNRP.pwn(53) : error 029: invalid expression, assumed zero
C:\Users\Cristian\Desktop\UG-RP\gamemodes\UNRP.pwn(53) : error 029: invalid expression, assumed zero
C:\Users\Cristian\Desktop\UG-RP\gamemodes\UNRP.pwn(53) : error 029: invalid expression, assumed zero
C:\Users\Cristian\Desktop\UG-RP\gamemodes\UNRP.pwn(53) : fatal error 107: too many error messages on one line

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


5 Errors.



Re: Script error. - TFreemen - 30.07.2014

Line 52/53?What is wrong with it xD