I need help I am a noob XD - 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: I need help I am a noob XD (
/showthread.php?tid=543916)
I need help I am a noob XD -
Kruno88 - 29.10.2014
Код:
C:\Users\Andrijana\Desktop\fps\gamemodes\gr.pwn(79) : error 017: undefined symbol "Killz"
C:\Users\Andrijana\Desktop\fps\gamemodes\gr.pwn(79) : warning 215: expression has no effect
C:\Users\Andrijana\Desktop\fps\gamemodes\gr.pwn(79) : error 001: expected token: ";", but found "]"
C:\Users\Andrijana\Desktop\fps\gamemodes\gr.pwn(79) : error 029: invalid expression, assumed zero
C:\Users\Andrijana\Desktop\fps\gamemodes\gr.pwn(79) : fatal error 107: too many error messages on one line
Код:
public OnPlayerConnect(playerid)
{
new pname[128]; // This get's the length of the player name
new file[128]; // This get's the lenght of the file
GetPlayerName(playerid, pname, sizeof(pname)); // This get's the player name with the lenght of the player name
format(file, sizeof(file), savefolder,pname); // This describe's where to save and how to save it
if(!dini_Exists(file)) { // If the file exist
dini_Create(file); // Create the file
dini_IntSet(file, "Score", 0); // Set's "Score"
dini_IntSet(file, "Money", 0); // Set's "Money"
dini_IntSet(file, "Killz", Killz[playerid]); // Set's "Kills" //This!!!!!!!!!!!!!!
dini_IntSet(file, "Deaths", Deathz[playerid]); // Set's "Deaths"
dini_IntSet(file, "Skin", 0); // Set's Skin
SetPlayerScore(playerid, dini_Int(file, "Score")); // This describes where to load the score
SetPlayerMoney(playerid, dini_Int(file, "Money")); // This describes where to load the money
SetPlayerSkin(playerid, dini_Int(file, "Skin")); // This describes where to load the skin
// and at last this set's the value which were on the file
}
else {
SetPlayerScore(playerid, dini_Int(file, "Score"));
SetPlayerMoney(playerid, dini_Int(file, "Money"));
SetPlayerSkin(playerid, dini_Int(file, "Skin"));
// the same thing
}
return 1;
}
Re: I need help I am a noob XD -
Eth - 29.10.2014
at the top of the script after the include:
and search for:
if you don't have it then add it after the new Killz[MAX_PLAYERS];
Re: I need help I am a noob XD -
Dziugsas - 29.10.2014
It would be better to integrate with an enum...
Re: I need help I am a noob XD -
nogh445 - 30.10.2014
dini is outdated you should try out some y_ini registration/login tutorials.