2 errors - 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: 2 errors (
/showthread.php?tid=424989)
2 errors -
Nivniv2 - 24.03.2013
Код:
C:\Users\user\Desktop\LRP\gamemodes\LRP.pwn(48319) : error 006: must be assigned to an array
C:\Users\user\Desktop\LRP\gamemodes\LRP.pwn(48319) : error 036: empty statement
Код:
CMD:accent(playerid, params[])
{
if(sscanf(params, "s[16]", params))
{
SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /accent [accent]");
SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /accent none - to remove your accent!");
return 1;
}
if(!strcmp(params, "none"))
{
format(PlayerInfo[playerid][pAccent], 16, "");
SendClientMessage(playerid, COLOR_LIGHTBLUE, " You are not using any accent now.");
}
else{
PlayerInfo[playerid][pAccent] = params};
return 1;
}
Re: 2 errors -
IstuntmanI - 24.03.2013
Change
pawn Код:
PlayerInfo[playerid][pAccent] = params};
to
pawn Код:
PlayerInfo[playerid][pAccent] = params;
If it doesn't work ... pAccent is numeric or string ?
Re: 2 errors -
Misiur - 24.03.2013
Already gave you answer in
https://sampforum.blast.hk/showthread.php?tid=424984
Don't create unnecessary threads, please
Re: 2 errors -
Nivniv2 - 24.03.2013
Quote:
Originally Posted by Misiur
|
But its not working
Re: 2 errors -
Omirrow - 24.03.2013
Quote:
Originally Posted by costel_nistor96
Change
pawn Код:
PlayerInfo[playerid][pAccent] = params};
to
pawn Код:
PlayerInfo[playerid][pAccent] = params;
If it doesn't work ... pAccent is numeric or string ?
|
Have you tried to do this?
Re: 2 errors -
Nivniv2 - 25.03.2013
Quote:
Originally Posted by Omirrow
Have you tried to do this?
|
Yes and its not working
Re: 2 errors -
MTCool - 25.03.2013
Try this kapara
PlayerInfo[playerid][pAccent] = params;}
Beazlaha
Re: 2 errors -
Nivniv2 - 25.03.2013
Quote:
Originally Posted by MTCool
Try this kapara
PlayerInfo[playerid][pAccent] = params;}
Beazlaha
|
Thanks man, the only error that left for it: "must be assigned to an array"
Same line
Re: 2 errors -
kamzaf - 25.03.2013
here:
pawn Код:
CMD:accent(playerid, params[])
{
if(sscanf(params, "s[16]", params))
{
SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /accent [accent]");
SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /accent none - to remove your accent!");
return 1;
}
if(!strcmp(params, "none"))
{
format(PlayerInfo[playerid][pAccent], PlayerInfo[playerid][pAccent], "");
SendClientMessage(playerid, COLOR_LIGHTBLUE, " You are not using any accent now.");
}
format(PlayerInfo[playerid][pAccent], PlayerInfo[playerid][pAccent], "%s", params);
return 1;
}
Re: 2 errors -
Nivniv2 - 25.03.2013
Quote:
Originally Posted by kamzaf
here:
pawn Код:
CMD:accent(playerid, params[]) { if(sscanf(params, "s[16]", params)) { SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /accent [accent]"); SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /accent none - to remove your accent!"); return 1; } if(!strcmp(params, "none")) { format(PlayerInfo[playerid][pAccent], PlayerInfo[playerid][pAccent], ""); SendClientMessage(playerid, COLOR_LIGHTBLUE, " You are not using any accent now."); } format(PlayerInfo[playerid][pAccent], PlayerInfo[playerid][pAccent], "%s", params); return 1; }
|
thanks bro