Help please
#1

Hey all. It've been a while since I scripted.

I have this line:

pawn Код:
dini_IntSet(file, "Nationality",PlayerInfo[playerid][pNationality] = inputtext);
THen this error

Код:
C:\Users\Bart\Desktop\SampScripting\gamemodes\Sunlight.pwn(317) : error 006: must be assigned to an array
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
What is the problem ?
Reply
#2

Ok I have this now

dini_IntSet(file, "Nationality",PlayerInfo[playerid][pNationality] = inputtext[35]);

No errors but it doesn't show up in my user file



pawn Код:
if (dialogid == 3)
    {
            new name[MAX_PLAYER_NAME], file[256];
            GetPlayerName(playerid, name, sizeof(name));
            format(file, sizeof(file), SERVER_USER_FILE, name);
            if(!response) return Kick(playerid);

            dini_IntSet(file, "Nationality",PlayerInfo[playerid][pNationality] = inputtext[35]);

    }
Reply
#3

PLease guys. I need help with this little problem.
Reply
#4

You can't use an equal sign in a function like that.

pawn Код:
strcat(inputtext, PlayerInfo[playerid][pNationality]); // copy 'inputtext' and the data of it in to your nationality variable
dini_IntSet(file, "Nationality",PlayerInfo[playerid][pNationality]); // use dini to set the value
Reply
#5

Now my dialog s like this

pawn Код:
if (dialogid == 3)
    {
            new name[MAX_PLAYER_NAME], file[256];
            GetPlayerName(playerid, name, sizeof(name));
            format(file, sizeof(file), SERVER_USER_FILE, name);
            if(!response) return Kick(playerid);
            strcat(inputtext, PlayerInfo[playerid][pNationality]); // copy 'inputtext' and the data of it in to your nationality variable
            dini_IntSet(file, "Nationality",PlayerInfo[playerid][pNationality]); // use dini to set the value

    }
It still doesn' work and I've got a warning

C:\Users\Bart\Desktop\SampScripting\gamemodes\Sunl ight.pwn(31 : warning 224: indeterminate array size in "sizeof" expression (symbol "maxlength")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#6

PLease guys. It's not solved yet.
Reply
#7

format(file, sizeof(file), SERVER_USER_FILE, name); ??
Reply
#8

It's already in:

pawn Код:
if (dialogid == 3)
    {
            new name[MAX_PLAYER_NAME], file[256];
            GetPlayerName(playerid, name, sizeof(name));
            format(file, sizeof(file), SERVER_USER_FILE, name);
            if(!response) return Kick(playerid);
            strcat(inputtext, PlayerInfo[playerid][pNationality]); // copy 'inputtext' and the data of it in to your nationality variable
            dini_IntSet(file, "Nationality",PlayerInfo[playerid][pNationality]); // use dini to set the value

    }
Reply
#9

Quote:
Originally Posted by HosCun
Посмотреть сообщение
you ned to script array stupd!!!!
Sorry to dissapoint you but..

this:
pawn Код:
strcat(inputtext[80], PlayerInfo[playerid][pNationality]); // copy 'inputtext' and the data of it in to your nationality variable
Will make your server crash
Reply
#10

Guys I'm waiting for one day now. I really need to have this fixed before I can go on scripting. So anyone knows what to do?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)