Help please - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help please (
/showthread.php?tid=258437)
Help please -
bartje01 - 30.05.2011
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 ?
Re: Help please -
bartje01 - 30.05.2011
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]);
}
Re: Help please -
bartje01 - 30.05.2011
PLease guys. I need help with this little problem.
Re: Help please -
Calgon - 30.05.2011
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
Re: Help please -
bartje01 - 30.05.2011
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.
Re: Help please -
bartje01 - 31.05.2011
PLease guys. It's not solved yet.
Re: Help please -
yanir3 - 31.05.2011
format(file, sizeof(file), SERVER_USER_FILE, name);


??
Re: Help please -
bartje01 - 31.05.2011
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
}
Re: Help please -
bartje01 - 31.05.2011
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
Re: Help please -
bartje01 - 31.05.2011
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?