format(PlayerInfo[playerid][pCountry], 128, "%s", strval(inputtext));
C:\Alex\County Wars TDM 0.3d\gamemodes\SCRP.pwn(2737) : error 033: array must be indexed (variable "country")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Try doing it this way:
pawn Код:
I guess you're saving country as a string, but I don't know Tell me what happened. |
C:\Alex\County Wars TDM 0.3d\gamemodes\SCRP.pwn(2736) : error 008: must be a constant expression; assumed zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Okay so after a little tutorial, on the registration step, the server asks players country, and he types his country name in input box which will get saved, But the problem i found is it actually doesn't show anything in /stats + in .ini file. It shows "Country = " That's It, My Code Below, Help Me If You Can.
![]() pawn Код:
|
new MyString = inputtext[0];
SomeVar = MyString;
forward Stats(playerid)
if(strcmp(cmd,"/stats",true)==0)
{
if(IsPlayerConnected(playerid))
{
Stats(playerid,playerid);
}
return 1;
}
public Stats(playerid)
{
if(IsPlayerConnected(playerid))
{
new country[128];
if(PlayerInfo[playerid][pCountry] == 1) { country = "Whatever"; }
else if(PlayerInfo[playerid][pCountry] == 2) { country = "Whatever else here"; }
new coordsstring[256];
format(coordsstring, sizeof(coordsstring),"\\ Stats //",);
SendClientMessage(playerid, COLOR,coordsstring);
format(coordsstring, sizeof(coordsstring), " Country: [%s]", country);
SendClientMessage(playerid, COLOR,coordsstring);
}
}
C:\Alex\County Wars TDM 0.3d\gamemodes\SCRP.pwn(2737) : warning 204: symbol is assigned a value that is never used: "country"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.