age - 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: age (
/showthread.php?tid=647748)
age -
Osamakurdi - 10.01.2018
I have this code
Код:
new age[MAX_PLAYERS];//TOP
CMD:myage(playerid, params[])
{
new myage, str[180];
if(sscanf(params, "i", myage)) return SCM(playerid, -1, "USAGE:/myage[age]");
format(str, sizeof(str), "Your Age Have Been Set To %i", myage);
SCM(playerid, -1, str);
age == myage;
return 1;
}
I Have This Errors :
Код:
C:\Users\Kurdi's\Desktop\samp037_svr_R2-1-1_win32\gamemodes\FirstCode.pwn(177) : error 033: array must be indexed (variable "age")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Error Line:
[CODE]
Код:
new age[MAX_PLAYERS];
Re: age -
Misiur - 10.01.2018
You want to assign myage to age of current player. So, first:
== is comparison, = is assignment
Well, this is still not good. You want to set only current player age. So:
Re: age -
Osamakurdi - 10.01.2018
Quote:
Originally Posted by Misiur
You want to assign myage to age of current player. So, first:
== is comparison, = is assignment
Well, this is still not good. You want to set only current player age. So:
|
Thanks !