Script error.
#1

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;
}

Reply
#2

Which is line 51?
Reply
#3

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

Код:
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;
}
Reply
#5

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

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;
}
Reply
#7

Aww, same error
Reply
#8

Try my code again.I`ve edited it.
Reply
#9

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.
Reply
#10

Line 52/53?What is wrong with it xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)