Posts: 497
Threads: 68
Joined: Jul 2013
Hello i have these errors i need to fix.
Код:
C:\Users\JakkenKoppen\Desktop\Rare stuff\PLAO\filterscripts\boombox.pwn(66) : error 001: expected token: ";", but found "public"
C:\Users\JakkenKoppen\Desktop\Rare stuff\PLAO\filterscripts\boombox.pwn(640) : warning 215: expression has no effect
C:\Users\JakkenKoppen\Desktop\Rare stuff\PLAO\filterscripts\boombox.pwn(643) : error 029: invalid expression, assumed zero
C:\Users\JakkenKoppen\Desktop\Rare stuff\PLAO\filterscripts\boombox.pwn(643) : error 029: invalid expression, assumed zero
C:\Users\JakkenKoppen\Desktop\Rare stuff\PLAO\filterscripts\boombox.pwn(643) : warning 215: expression has no effect
C:\Users\JakkenKoppen\Desktop\Rare stuff\PLAO\filterscripts\boombox.pwn(643) : error 001: expected token: ";", but found "]"
C:\Users\JakkenKoppen\Desktop\Rare stuff\PLAO\filterscripts\boombox.pwn(643) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
Line 66 =
Код:
public OnFilterScriptInit()
Line 643 =
Код:
PlayerInfo[giveplayerid][pDonateRank] = 3;
Posts: 854
Threads: 154
Joined: Jun 2012
Reputation:
0
You need to include more, those two lines are standard and don't have any visual errors.
Posts: 497
Threads: 68
Joined: Jul 2013
Here is the public onfilterscript section and defines
Код:
#define Filterscript
#include <a_samp>//Credits to SA-MP Team
#include <zcmd>//Credits to Zeex
#include <sscanf2>//Credits to ******
#include <streamer>//Credits to Incognito
#include <foreach>//Credits to ******
//================Dialogs===================
#define GivePlayerCash
#define REFUNDME 284
#define GetPlayerCash
#define giveplayerid 6
#define PlayerInfo 5
#define DIALOG_BOOMBOX 500
#define DIALOG_BOOMBOX1 501
#define DIALOG_BOOMBOX2 502
#define DIALOG_BOOMBOX3 503
#define DIALOG_BOOMBOX4 504
#define DIALOG_BOOMBOX5 505
#define DIALOG_BOOMBOX6 506
#define DIALOG_BOOMBOX7 507
//==========================================
//--------------------------------------------------------
//===============Variables==================
#define SCM SendClientMessage
//new Boombox[MAX_PLAYERS]; // Part of Variable
new gPlayerLoggin[MAX_PLAYERS char];
new pDonateRank
//==========================================
//--------------------------------------------------------
//===============Colors=====================
#define COLOR_LIGHTBLUE 0x00C3FFFF
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_RED 0xFF0000FF
#define COLOR_LIME 0x00FF33FF
#define COLOR_GREY 0xAFAFAFFF
#define COL_WHITE "{FFFFFF}"
#define COL_LBLUE "{00C3FF}"
#define COL_RED "{FF0000}"
#define COL_LIME "{00FF33}"
#define COLOR_PURPLE 0xC2A2DAAA
//==========================================
public OnFilterScriptInit()
{
print("----------------LOADED----------------");
print("======Dynamic Boombox System by San1=====");
print("----------------LOADED----------------");
return 1;
}
public OnFilterScriptExit()
{
print("----------------UNLOADED----------------");
print("======Dynamic Boombox System by San1=====");
print("----------------UNLOADED----------------");
return 1;
}
public OnPlayerConnect(playerid)
{
gPlayerLoggin{playerid} = 1;
return 1;
}
public OnPlayerDisconnect(playerid)
{
if(GetPVarType(playerid, "PlacedBB"))
{
DestroyDynamicObject(GetPVarInt(playerid, "PlacedBB"));
DestroyDynamic3DTextLabel(Text3D:GetPVarInt(playerid, "BBLabel"));
if(GetPVarType(playerid, "BBArea"))
{
foreach(Player,i)
{
if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "BBArea")))
{
StopAudioStreamForPlayer(i);
SendClientMessage(i, COLOR_LIGHTBLUE, " The boombox creator has disconnected from the server.");
}
}
}
}
return 1;
}
CMD:bbhelp(playerid, params[])
{
SendClientMessage(playerid, -1, "Boombox Commands---: /placeboombox /pickupboombox /setboombox---");
return 1;
}
and here is the whole refundme section
Код:
if(dialogid == REFUNDME)
{
if(response)
{
if(listitem == 0)
{
if (GetPlayerCash(playerid) >= -4000000)
{
GivePlayerCash(playerid, 4000000);
if(IsPlayerConnected(giveplayerid))
{
PlayerInfo[giveplayerid][pDonateRank] = 3;
PlayerInfo[giveplayerid][pTempVIP] = 0;
PlayerInfo[giveplayerid][pBuddyInvited] = 0;
new playerip[32];
GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
PlayerInfo[giveplayerid][pVIPExpire] = gettime()+86400*days;
}
if(listitem == 1)
{
if (GetPlayerCash(playerid) >= -6000000)
{
GivePlayerCash(playerid, 6000000);
if(IsPlayerConnected(giveplayerid))
{
PlayerInfo[giveplayerid][pDonateRank] = 2;
PlayerInfo[giveplayerid][pTempVIP] = 0;
PlayerInfo[giveplayerid][pBuddyInvited] = 0;
new playerip[32];
GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
PlayerInfo[giveplayerid][pVIPExpire] = gettime()+86400*days;
}
if(listitem == 2)
{
if (GetPlayerCash(playerid) >= -8000000)
{
GivePlayerCash(playerid, 8000000);
if(IsPlayerConnected(giveplayerid))
{
PlayerInfo[giveplayerid][pDonateRank] = 1;
PlayerInfo[giveplayerid][pTempVIP] = 0;
PlayerInfo[giveplayerid][pBuddyInvited] = 0;
new playerip[32];
GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
PlayerInfo[giveplayerid][pVIPExpire] = gettime()+86400*days;
}
else
{
return 1;
}
}
return 1;
}
Posts: 497
Threads: 68
Joined: Jul 2013
Now i get these errors
Код:
C:\Users\JakkenKoppen\Desktop\Rare stuff\PLAO\filterscripts\boombox.pwn(128) : error 028: invalid subscript (not an array or too many subscripts): "Boombox"
C:\Users\JakkenKoppen\Desktop\Rare stuff\PLAO\filterscripts\boombox.pwn(128) : warning 215: expression has no effect
C:\Users\JakkenKoppen\Desktop\Rare stuff\PLAO\filterscripts\boombox.pwn(128) : error 001: expected token: ";", but found "]"
C:\Users\JakkenKoppen\Desktop\Rare stuff\PLAO\filterscripts\boombox.pwn(128) : error 029: invalid expression, assumed zero
C:\Users\JakkenKoppen\Desktop\Rare stuff\PLAO\filterscripts\boombox.pwn(128) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Line =
Код:
Boombox[targetid] = 1;
Here is the whole section
Код:
CMD:giveboombox(playerid, params[]) // Part of Variable
{
if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_WHITE, "You are not authorized to use this command");
new targetid, string[128], pname[MAX_PLAYER_NAME];
if(sscanf(params,"u", targetid)) return SCM(playerid, COLOR_WHITE, "USAGE:/giveboombox [playerid]");
Boombox[targetid] = 1;
GetPlayerName(targetid, pname, sizeof(pname));
format(string, sizeof(string), "You Have Given %s a Boombox", pname);
SCM(playerid, COLOR_LIGHTBLUE, string);
SCM(targetid, COLOR_LIGHTBLUE, "You have been given a boombox by an administrator(/bbhelp)");
return 1;
}
Posts: 497
Threads: 68
Joined: Jul 2013
Can anyone give me a define?