Help with these errors pls
#1

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <dini>
#include <zcmd>


new PlayerName[140];

new rpmark1[MAX_PLAYERS];
new rpmark2[MAX_PLAYERS];
new rpmark3[MAX_PLAYERS];
new rpmark4[MAX_PLAYERS];
new rpmark5[MAX_PLAYERS];
new rpmark6[MAX_PLAYERS];
new rpmark7[MAX_PLAYERS];
new rpmark8[MAX_PLAYERS];
new rpmark9[MAX_PLAYERS];
new rpmark10[MAX_PLAYERS];

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid)
{
    if(dini_Exists(PlayerPath1(playerid)) return LoadPlayerRpmarks4(playerid);
    if(dini_Exists(PlayerPath2(playerid)) return LoadPlayerRpmarks4(playerid);
    if(dini_Exists(PlayerPath3(playerid)) return LoadPlayerRpmarks4(playerid);
    if(dini_Exists(PlayerPath4(playerid)) return LoadPlayerRpmarks4(playerid);
    if(dini_Exists(PlayerPath5(playerid)) return LoadPlayerRpmarks4(playerid);
    if(dini_Exists(PlayerPath6(playerid)) return LoadPlayerRpmarks5(playerid);
    if(dini_Exists(PlayerPath7(playerid)) return LoadPlayerRpmarks6(playerid);
    if(dini_Exists(PlayerPath8(playerid)) return LoadPlayerRpmarks7(playerid);
    if(dini_Exists(PlayerPath9(playerid)) return LoadPlayerRpmarks9(playerid);
    if(dini_Exists(PlayerPath10(playerid)) return LoadPlayerRpmarks10(playerid);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        // Do something here
        return 1;
    }
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
//
stock PlayerPath1(playerid)
{
new path[45];
format(path, sizeof(path),"Rpmarks1_%s.ini", PlayerName(playerid));
return path;
}
stock PlayerPath2(playerid)
{
new path[45];
format(path, sizeof(path),"Rpmarks2_%s.ini", PlayerName(playerid));
return path;
}
stock PlayerPath3(playerid)
{
new path[45];
format(path, sizeof(path),"Rpmarks3_%s.ini", PlayerName(playerid));
return path;
}
stock PlayerPath4(playerid)
{
new path[45];
format(path, sizeof(path),"Rpmarks4_%s.ini", PlayerName(playerid));
return path;
}
stock PlayerPath5(playerid)
{
new path[45];
format(path, sizeof(path),"Rpmarks5_%s.ini", PlayerName(playerid));
return path;
}
stock PlayerPath6(playerid)
{
new path[45];
format(path, sizeof(path),"Rpmarks6_%s.ini", PlayerName(playerid));
return path;
}
stock PlayerPath7(playerid)
{
new path[45];
format(path, sizeof(path),"Rpmarks7_%s.ini", PlayerName(playerid));
return path;
}
stock PlayerPath8(playerid)
{
new path[45];
format(path, sizeof(path),"Rpmarks8_%s.ini", PlayerName(playerid));
return path;
}
stock PlayerPath9(playerid)
{
new path[45];
format(path, sizeof(path),"Rpmarks9_%s.ini", PlayerName(playerid));
return path;;
}
stock PlayerPath10(playerid)
{
new path[45];
format(path, sizeof(path),"Rpmarks10_%s.ini", PlayerName(playerid));
return path;
}
// Stocks
stock LoadPlayerRpmarks1(playerid)
{
rpmark1[playerid] == 1;
}
stock LoadPlayerRpmarks2(playerid)
{
rpmark2[playerid] == 1;
}
stock LoadPlayerRpmarks3(playerid)
{
rpmark3[playerid] == 1;
}
stock LoadPlayerRpmarks4(playerid)
{
rpmark4[playerid] == 1;
}
stock LoadPlayerRpmarks5(playerid)
{
rpmark5[playerid] == 1;
}
stock LoadPlayerRpmarks6(playerid)
{
rpmark6[playerid] == 1;
}
stock LoadPlayerRpmarks7(playerid)
{
rpmark7[playerid] == 1;
}
stock LoadPlayerRpmarks8(playerid)
{
rpmark8[playerid] == 1;
}
stock LoadPlayerRpmarks9(playerid)
{
rpmark9[playerid] == 1;
}
stock LoadPlayerRpmarks10(playerid)
{
rpmark10[playerid] == 1;
}
//
CMD:setrpmark1(playerid,params[])
{
rpmark1[playerid] == 1;
dini_Create(PlayerPath1(playerid))
SendClientMessage(playerid,0xD6D6D6AA,"You got 1 rpmark by the following teacher");
return 1;
}
CMD:setrpmark2(playerid,params[])
{
rpmark2[playerid] == 1;
dini_Create(PlayerPath2(playerid))
SendClientMessage(playerid,0xD6D6D6AA,"You got 2 rpmark by the following teacher");
return 1;
}
CMD:setrpmark3(playerid,params[])
{
rpmark3[playerid] == 1;
dini_Create(PlayerPath3(playerid))
SendClientMessage(playerid,0xD6D6D6AA,"You got 3 rpmark by the following teacher");
return 1;
}
CMD:setrpmark4(playerid,params[])
{
rpmark4[playerid] == 1;
dini_Create(PlayerPath4(playerid))
SendClientMessage(playerid,0xD6D6D6AA,"You got 4 rpmark by the following teacher");
return 1;
}
CMD:setrpmark5(playerid,params[])
{
rpmark5[playerid] == 1;
SendClientMessage(playerid,0xD6D6D6AA,"You got 5 rpmark by the following teacher");
dini_Create(PlayerPath5(playerid))
return 1;
}
CMD:setrpmark6(playerid,params[])
{
rpmark6[playerid] == 1;
dini_Create(PlayerPath6(playerid))
SendClientMessage(playerid,0xD6D6D6AA,"You got 6 rpmark by the following teacher");
return 1;
}
CMD:setrpmark7(playerid,params[])
{
rpmark7[playerid] == 1;
dini_Create(PlayerPath7(playerid))
SendClientMessage(playerid,0xD6D6D6AA,"You got 7 rpmark by the following teacher");
return 1;
}
CMD:setrpmark8(playerid,params[])
{
rpmark8[playerid] == 1;
dini_Create(PlayerPath8(playerid))
SendClientMessage(playerid,0xD6D6D6AA,"You got 8 rpmark by the following teacher");
return 1;
}
CMD:setrpmark9(playerid,params[])
{
rpmark9[playerid] == 1;
dini_Create(PlayerPath9(playerid))
SendClientMessage(playerid,0xD6D6D6AA,"You got 9 rpmark by the following teacher");
return 1;
}
CMD:setrpmark10(playerid,params[])
{
rpmark10[playerid] == 1;
dini_Create(PlayerPath10(playerid))
SendClientMessage(playerid,0xD6D6D6AA,"You got 10 rpmark by the following teacher");
return 1;
}
CMD:showrpmark1(playerid,params[])
{
new otherid;
if(dini_Exists(PlayerPath1(playerid)) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 1 rpmark");
return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
if(dini_Exists(PlayerPath2(playerid)) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 2 rpmark");
return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
if(dini_Exists(PlayerPath3(playerid)) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 3 rpmark");
return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
if(dini_Exists(PlayerPath4(playerid)) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 4 rpmark");
return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
if(dini_Exists(PlayerPath5(playerid)) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 5 rpmark");
return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
if(dini_Exists(PlayerPath6(playerid)) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 6 rpmark");
return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
if(dini_Exists(PlayerPath7(playerid)) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 7 rpmark");
return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
if(dini_Exists(PlayerPath8(playerid)) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 8 rpmark");
return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
if(dini_Exists(PlayerPath9(playerid)) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 9 rpmark");
return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
if(dini_Exists(PlayerPath10(playerid)) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 10 rpmark");
return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
return 1;
}
I made this myself, but there are some errors in this, giving the errors code below, pls fix it if you guys can
Thanks guys in advance
Regards
RyanPetersons


Errors:
pawn Код:
C:\DOCUME~1\MOSTWA~1\Desktop\Untitled.pwn(72) : error 001: expected token: ")", but found "return"
C:\DOCUME~1\MOSTWA~1\Desktop\Untitled.pwn(73) : error 001: expected token: ")", but found "return"
C:\DOCUME~1\MOSTWA~1\Desktop\Untitled.pwn(74) : error 001: expected token: ")", but found "return"
C:\DOCUME~1\MOSTWA~1\Desktop\Untitled.pwn(75) : error 001: expected token: ")", but found "return"
C:\DOCUME~1\MOSTWA~1\Desktop\Untitled.pwn(76) : error 001: expected token: ")", but found "return"
C:\DOCUME~1\MOSTWA~1\Desktop\Untitled.pwn(77) : error 001: expected token: ")", but found "return"
C:\DOCUME~1\MOSTWA~1\Desktop\Untitled.pwn(78) : error 001: expected token: ")", but found "return"
C:\DOCUME~1\MOSTWA~1\Desktop\Untitled.pwn(79) : error 001: expected token: ")", but found "return"
C:\DOCUME~1\MOSTWA~1\Desktop\Untitled.pwn(80) : error 001: expected token: ")", but found "return"
C:\DOCUME~1\MOSTWA~1\Desktop\Untitled.pwn(81) : error 001: expected token: ")", but found "return"
C:\DOCUME~1\MOSTWA~1\Desktop\Untitled.pwn(263) : error 012: invalid function call, not a valid address
C:\DOCUME~1\MOSTWA~1\Desktop\Untitled.pwn(263) : warning 215: expression has no effect
C:\DOCUME~1\MOSTWA~1\Desktop\Untitled.pwn(263) : error 001: expected token: ";", but found ")"
C:\DOCUME~1\MOSTWA~1\Desktop\Untitled.pwn(263) : error 029: invalid expression, assumed zero
C:\DOCUME~1\MOSTWA~1\Desktop\Untitled.pwn(263) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


14 Errors.
Reply
#2

Can anyone reply here? please ffs.
Reply
#3

pawn Код:
if(dini_Exists(PlayerPath1(playerid)) return LoadPlayerRpmarks4(playerid);
if(dini_Exists(PlayerPath2(playerid)) return LoadPlayerRpmarks4(playerid);
if(dini_Exists(PlayerPath3(playerid)) return LoadPlayerRpmarks4(playerid);
if(dini_Exists(PlayerPath4(playerid)) return LoadPlayerRpmarks4(playerid);
if(dini_Exists(PlayerPath5(playerid)) return LoadPlayerRpmarks4(playerid);
if(dini_Exists(PlayerPath6(playerid)) return LoadPlayerRpmarks5(playerid);
if(dini_Exists(PlayerPath7(playerid)) return LoadPlayerRpmarks6(playerid);
if(dini_Exists(PlayerPath8(playerid)) return LoadPlayerRpmarks7(playerid);
if(dini_Exists(PlayerPath9(playerid)) return LoadPlayerRpmarks9(playerid);
if(dini_Exists(PlayerPath10(playerid)) return LoadPlayerRpmarks10(playerid);
To

pawn Код:
if(dini_Exists(PlayerPath1(playerid))) return LoadPlayerRpmarks4(playerid);
if(dini_Exists(PlayerPath2(playerid))) return LoadPlayerRpmarks4(playerid);
if(dini_Exists(PlayerPath3(playerid))) return LoadPlayerRpmarks4(playerid);
if(dini_Exists(PlayerPath4(playerid))) return LoadPlayerRpmarks4(playerid);
if(dini_Exists(PlayerPath5(playerid))) return LoadPlayerRpmarks4(playerid);
if(dini_Exists(PlayerPath6(playerid))) return LoadPlayerRpmarks5(playerid);
if(dini_Exists(PlayerPath7(playerid))) return LoadPlayerRpmarks6(playerid);
if(dini_Exists(PlayerPath8(playerid))) return LoadPlayerRpmarks7(playerid);
if(dini_Exists(PlayerPath9(playerid))) return LoadPlayerRpmarks9(playerid);
if(dini_Exists(PlayerPath10(playerid))) return LoadPlayerRpmarks10(playerid);
For the other errors/warnings, can you tell me what is PlayerName supposed to do?
Reply
#4

PlayerName is for:
as, it should save Rpmarks1_%s, so %s means to be define as the name so PlayerName[140]; defines the name so it should be for example Rpmark1_Alee.
Reply
#5

Ah so it's supposed to return a player's name! Check this fixed version of your code (Explainations in comments) and I advise you to redo your showrpmark1 command as it gives warnings and won't work as you think it will.
Reply
#6

Can you please paste the code here, because pastebin doesn't works for me or upload it on pastebin.ca not on pastebin.com
Reply
#7

Can anyone reply plas, here?
Reply
#8

just add one more bracket after each one, for example:

Код:
yours: if(dini_Exists(PlayerPath1(playerid))

Edited: if(dini_Exists(PlayerPath1(playerid)))
Reply
#9

Quote:
Originally Posted by RyanPetersons
Посмотреть сообщение
Can you please paste the code here, because pastebin doesn't works for me or upload it on pastebin.ca not on pastebin.com
http://pastebin.ca/2173465
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)