I need help I am a noob XD
#1

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

at the top of the script after the include:
pawn Код:
new Killz[MAX_PLAYERS];
and search for:
pawn Код:
new Deathz[MAX_PLAYERS];
if you don't have it then add it after the new Killz[MAX_PLAYERS];
Reply
#3

It would be better to integrate with an enum...
Reply
#4

dini is outdated you should try out some y_ini registration/login tutorials.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)