Country
#1

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 Код:
format(PlayerInfo[playerid][pCountry], 128, "%s", strval(inputtext));
Reply
#2

Got Another Bug Right Now

((Whats your name in west coast?))
Reply
#3

pawn Код:
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.
I See.
Reply
#4

Quote:
Originally Posted by belhot1992
Посмотреть сообщение
Try doing it this way:

pawn Код:
new country[128];
country = strval(inputtext);
format(PlayerInfo[playerid][pCountry], 128, "%s", country);
Don't know if it will work though..
I guess you're saving country as a string, but I don't know
Tell me what happened.
Isn't strval() used to convert string to integer ?
Reply
#5

pawn Код:
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.
Lol.
Reply
#6

Well, I Gotta Go For Sleep Now.
Thanks for the help, See ya Tomorrow West Rider.
You're a helpful friend, Add me at MSN if you ever need help.
amz-dm@hotmail.com
Reply
#7

Quote:
Originally Posted by BetaLaxx
Посмотреть сообщение
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 Код:
format(PlayerInfo[playerid][pCountry], 128, "%s", strval(inputtext));
pawn Код:
new MyString = inputtext[0];
SomeVar = MyString;
I'm not sure if that would work for what you're doing, could always give it a shot though lol - untested
Reply
#8

or do above ^
Reply
#9

Basic /stats command.

pawn Код:
forward Stats(playerid)
pawn Код:
if(strcmp(cmd,"/stats",true)==0)
        {
            if(IsPlayerConnected(playerid))
            {
                Stats(playerid,playerid);
            }
            return 1;
        }


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

Not Asking /Stats Command.
Force On The Post.

And:
pawn Код:
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.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)