Strange and ugly error.
#1

I am getting a compiling error, I do not see any problem at all.

Код:
C:\Users\sean mcelholm\Desktop\SAN-RP Scripting - PRIVATE\gamemodes\PS-RP.pwn(7891) : error 012: invalid function call, not a valid address
C:\Users\sean mcelholm\Desktop\SAN-RP Scripting - PRIVATE\gamemodes\PS-RP.pwn(7891) : warning 215: expression has no effect
C:\Users\sean mcelholm\Desktop\SAN-RP Scripting - PRIVATE\gamemodes\PS-RP.pwn(7891) : error 001: expected token: ";", but found ")"
C:\Users\sean mcelholm\Desktop\SAN-RP Scripting - PRIVATE\gamemodes\PS-RP.pwn(7891) : error 029: invalid expression, assumed zero
C:\Users\sean mcelholm\Desktop\SAN-RP Scripting - PRIVATE\gamemodes\PS-RP.pwn(7891) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
forward OnPlayerRegister(playerid, password[]);
public OnPlayerRegister(playerid, password[])
{
    if(IsPlayerConnected(playerid))
    {
        new playername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playername, sizeof(playername));
        new string[255];

        format(string, sizeof(string), "users/%s.ini", playername);//error line

        if(!dini_Exists(string))
        {
            dini_Create(string);
            dini_Set(string, "Key", password);
            dini_IntSet(string, "Cash", PlayerInfo[playerid][pCash]);
            dini_IntSet(string, "Account", PlayerInfo[playerid][pAccount]);
            dini_IntSet(string, "AdminLevel", PlayerInfo[playerid][pAdmin]);
            dini_IntSet(string, "Level", PlayerInfo[playerid][pLevel]);
            dini_IntSet(string, "Respect", PlayerInfo[playerid][pExp]);
            dini_IntSet(string, "UpgradePoints", PlayerInfo[playerid][gPupgrade]);
            dini_IntSet(string, "Kills", PlayerInfo[playerid][pKills]);
            dini_IntSet(string, "Gun1", PlayerInfo[playerid][pGun1]);
            dini_IntSet(string, "Gun2", PlayerInfo[playerid][pGun2]);
            dini_IntSet(string, "Gun3", PlayerInfo[playerid][pGun3]);
            dini_IntSet(string, "Gun4", PlayerInfo[playerid][pGun4]);
            dini_IntSet(string, "Gun5", PlayerInfo[playerid][pGun5]);
            dini_IntSet(string, "Gun6", PlayerInfo[playerid][pGun6]);
            dini_IntSet(string, "Gun7", PlayerInfo[playerid][pGun7]);
            dini_IntSet(string, "Gun8", PlayerInfo[playerid][pGun8]);
            dini_IntSet(string, "Gun9", PlayerInfo[playerid][pGun9]);
            dini_IntSet(string, "Gun10", PlayerInfo[playerid][pGun10]);
            dini_IntSet(string, "Gun11", PlayerInfo[playerid][pGun11]);
            dini_IntSet(string, "Gun12", PlayerInfo[playerid][pGun12]);
            dini_IntSet(string, "Gun13", PlayerInfo[playerid][pGun13]);
            dini_IntSet(string, "Ammo1", PlayerInfo[playerid][pAmmo1]);
            dini_IntSet(string, "Ammo2", PlayerInfo[playerid][pAmmo2]);
            dini_IntSet(string, "Ammo3", PlayerInfo[playerid][pAmmo3]);
            dini_IntSet(string, "Ammo4", PlayerInfo[playerid][pAmmo4]);
            dini_IntSet(string, "Ammo5", PlayerInfo[playerid][pAmmo5]);
            dini_IntSet(string, "Ammo6", PlayerInfo[playerid][pAmmo6]);
            dini_IntSet(string, "Ammo7", PlayerInfo[playerid][pAmmo7]);
            dini_IntSet(string, "Ammo8", PlayerInfo[playerid][pAmmo8]);
            dini_IntSet(string, "Ammo9", PlayerInfo[playerid][pAmmo9]);
            dini_IntSet(string, "Ammo10", PlayerInfo[playerid][pAmmo10]);
            dini_IntSet(string, "Ammo11", PlayerInfo[playerid][pAmmo11]);
            dini_IntSet(string, "Ammo12", PlayerInfo[playerid][pAmmo12]);
            dini_IntSet(string, "Ammo13", PlayerInfo[playerid][pAmmo13]);
            dini_FloatSet(string, "pSHealth", PlayerInfo[playerid][pSHealth]);
            dini_FloatSet(string, "Health", PlayerInfo[playerid][pHealth]);
            dini_FloatSet(string, "Pos_x", PlayerInfo[playerid][pPos_x]);
            dini_FloatSet(string, "Pos_y", PlayerInfo[playerid][pPos_y]);
            dini_FloatSet(string, "Pos_z", PlayerInfo[playerid][pPos_z]);
            dini_IntSet(string, "Int", PlayerInfo[playerid][pInt]);
            dini_IntSet(string, "Local", PlayerInfo[playerid][pLocal]);
            dini_IntSet(string, "Team", PlayerInfo[playerid][pTeam]);
            dini_IntSet(string, "Char", PlayerInfo[playerid][pModel]);
            dini_IntSet(string, "PhoneNr", PlayerInfo[playerid][pPnumber]);
            dini_IntSet(string, "House", PlayerInfo[playerid][pHousekey]);
            dini_IntSet(string, "Bizz", PlayerInfo[playerid][pPbiskey]);
            dini_IntSet(string, "Banned", PlayerInfo[playerid][pBanned]);
            dini_IntSet(string, "FightSkill", PlayerInfo[playerid][pFightSkill]);
            dini_IntSet(string, "Sex", PlayerInfo[playerid][pSex]);
            dini_IntSet(string, "Age", PlayerInfo[playerid][pAge]);
            dini_IntSet(string, "Tutorial", PlayerInfo[playerid][pTut]);
            dini_IntSet(string, "Member", PlayerInfo[playerid][pMember]);
            dini_IntSet(string, "Rank", PlayerInfo[playerid][pRank]);
            dini_IntSet(string, "Crashed", PlayerInfo[playerid][pCrashed]);
            dini_IntSet(string, "Job", PlayerInfo[playerid][pJob]);
            dini_IntSet(string, "HouseEntered", HouseEntered[playerid]);
            dini_IntSet(string, "IntEntered", IntEntered[playerid]);
            dini_FloatSet(string, "CrashHealth",PlayerInfo[playerid][pCrashHealth]);
            dini_FloatSet(string, "CrashArmour",PlayerInfo[playerid][pCrashArmour]);
            dini_IntSet(string, "World", PlayerInfo[playerid][pWorld]);
            dini_IntSet(string, "PayCheck", PlayerInfo[playerid][pPayCheck]);
            dini_IntSet(string, "PayDay", PlayerInfo[playerid][pPayDay]);
            dini_IntSet(string, "DonateRank", PlayerInfo[playerid][pDonateRank]);
            dini_IntSet(string, "ConnectTime", PlayerInfo[playerid][pConnectTime]);
            dini_IntSet(string, "DonateTime", PlayerInfo[playerid][pDonateTime]);
            dini_IntSet(string, "Jailed", PlayerInfo[playerid][pJailed]);
            dini_IntSet(string, "JailTime", PlayerInfo[playerid][pJailTime]);
            dini_IntSet(string, "Drugs", PlayerInfo[playerid][pDrugs]);
            dini_IntSet(string, "Materials", PlayerInfo[playerid][pMats]);
            dini_IntSet(string, "VaultOwned", PlayerInfo[playerid][pVaultOwned]);
            dini_IntSet(string, "VaultDrugs", PlayerInfo[playerid][pVaultDrugs]);
            dini_IntSet(string, "VaultMats", PlayerInfo[playerid][pVaultMats]);
            dini_IntSet(string, "Watch", PlayerInfo[playerid][pWatch]);
            dini_IntSet(string, "PhoneBook", PlayerInfo[playerid][pPhoneBook]);
            dini_IntSet(string, "Mask", PlayerInfo[playerid][pMask]);
            dini_IntSet(string, "CarLic", PlayerInfo[playerid][pDrivLic]);
            dini_IntSet(string, "Car", PlayerInfo[playerid][pCarkey]);
            dini_IntSet(string, "Car2", PlayerInfo[playerid][pCarkey2]);
            dini_IntSet(string, "Car3", PlayerInfo[playerid][pCarkey3]);
            dini_IntSet(string, "Married", PlayerInfo[playerid][pMarried]);
            dini_IntSet(string, "Helper", PlayerInfo[playerid][pHelper]);
            dini_IntSet(string, "Developer", PlayerInfo[playerid][pDeveloper]);
            dini_IntSet(string, "WantedLevel", WantedLevel[playerid]);
            dini_IntSet(string, "GunLic", PlayerInfo[playerid][pGunLic]);
            dini_IntSet(string, "Crimes", PlayerInfo[playerid][pCrimes]);
            dini_IntSet(string, "Arrested", PlayerInfo[playerid][pArrested]);
            dini_Set(string, "MarriedTo", PlayerInfo[playerid][pMarriedTo]);
            dini_Set(string, "Taunt", PlayerInfo[playerid][pTaunt]);
            dini_IntSet(string, "DonateCarDate", PlayerInfo[playerid][pDonatorCarDate]);
            dini_IntSet(string, "Warrant", PlayerInfo[playerid][pWarrant]);
            dini_Set(string, "WarrantReason", PlayerInfo[playerid][pWarrantReason]);
            dini_IntSet(string, "FactionIdent", PlayerInfo[playerid][pFactionIden]);
            dini_IntSet(string, "LockTime", PlayerInfo[playerid][pLockTime]);
            dini_IntSet(string, "Boombox", PlayerInfo[playerid][pBoombox]);
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, "Unable to register, account already exists.");
            Kick(playerid);
            return 1;
        }
    }
    return 1;
}
Reply
#2

Which lines are the error-lines?
Reply
#3

Quote:
Originally Posted by DeathOnaStick
Посмотреть сообщение
Which lines are the error-lines?
I've put a comment on the line for you.
Reply
#4

the only problem I see is the "/" lol... its not like this "/", but like this "\"
Reply
#5

Quote:
Originally Posted by DR3AD
Посмотреть сообщение
the only problem I see is the "/" lol... its not like this "/", but like this "\"
I tried it your way, but it made no difference.
Reply
#6

Linux OS uses forward slashes anyway and this also works on Windows. I don't quite see what the problem is, though. What happens when you comment the line out?
Reply
#7

did u made the
pawn Код:
#include <a_samp>
at the top of the script?
Reply
#8

pawn Код:
else
        {
            SendClientMessage(playerid, COLOR_WHITE, "Unable to register, account already exists.");
            Kick(playerid);
            return 1;
        }
Kinda bit laughed there..

How about the returning user? So they will be automatically kicked?

Sorry if this out of topic
Reply
#9

Quote:
Originally Posted by Vince
Посмотреть сообщение
Linux OS uses forward slashes anyway and this also works on Windows. I don't quite see what the problem is, though. What happens when you comment the line out?
The error moves to a similar line, at OnPlayerLogin then to OnPlayerDataSave if I comment out the same line.


pawn Код:
format(string, sizeof(string), "users/%s.ini", PlayerName(playerid));
There is a error on this type of line.
Reply
#10

Blind guess, but don't you happen to #define format somewhere? The error is not path related, but format

@BlackID: some servers don't allow ingame reg
Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)