Still have probs
#1

H:\PC Games\GTA San Andreas\pawno\include\dudb.inc(25) : fatal error 100: cannot read from file: "dutils"

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


1 Error.
Reply
#2

you need dutils.inc search for it
Reply
#3

Even More PROBS

H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(256) : error 047: array sizes do not match, or destination array is too small
H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(259) : error 047: array sizes do not match, or destination array is too small
H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(29 : error 047: array sizes do not match, or destination array is too small
H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(322) : error 047: array sizes do not match, or destination array is too small
H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(353) : error 047: array sizes do not match, or destination array is too small
H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(483) : error 047: array sizes do not match, or destination array is too small
H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(489) : error 047: array sizes do not match, or destination array is too small
H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(539) : error 047: array sizes do not match, or destination array is too small
H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(632) : error 021: symbol already defined: "strtok"
H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(647) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


10 Errors.
Reply
#4

Quote:
Originally Posted by Free17Theo
Even More PROBS

H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(256) : error 047: array sizes do not match, or destination array is too small
H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(259) : error 047: array sizes do not match, or destination array is too small
H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(29 : error 047: array sizes do not match, or destination array is too small
H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(322) : error 047: array sizes do not match, or destination array is too small
H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(353) : error 047: array sizes do not match, or destination array is too small
H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(483) : error 047: array sizes do not match, or destination array is too small
H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(489) : error 047: array sizes do not match, or destination array is too small
H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(539) : error 047: array sizes do not match, or destination array is too small
H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(632) : error 021: symbol already defined: "strtok"
H:\PC Games\GTA San Andreas\filterscripts\Starter kit.pwn(647) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


10 Errors.
you already defined: "strtok" should not you

and "array sizes do not match" Must be the exact number
Reply
#5

So what am i supposed to do?
Reply
#6

Symbol already defined means
1:it is already somewhere in the script
2:You tried to use #define when it was already defined.
For you it's 1
Reply
#7

gamemode1?
Reply
#8

What do i do to fix it.
Reply
#9

Somewhere you're using an invalid cell in an array

Example:
new variable[50]; //this creates an array with 50 cells, cells 0 - 49
variable[57]=1337; //This can't work because there is no cell 57

Same effect with strings, the amount of cells is basically how many letters it can have, in the previous case, you couldn't have more than 49 letters (0 counts as something or another)
Reply
#10

ok here is the lst.

#include <a_samp>
#include <dudb>
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define COLOR_WHITE 0xFFFFFFFF
#define ADMIN_MSG 0xFF6347AA
#define COLOR_RED 0xAA3333AA
#define ADMIN_COLOR 0xFF0000FF
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_SYSTEM 0xEFEFF7AA
#define TEAM_CITIZEN 1
#define TEAM_COP 2
#define TEAM_SWAT 3
#define TEAM_ROBBER 4
#define TEAM_CITIZEN_COLOR 0xFFFFFFFF
#define TEAM_COP_COLOR 0x33CCFFAA
#define TEAM_SWAT_COLOR 0xFFFFF
#define TEAM_ROBBER_COLOR 0x804000FF
new LastMe[MAX_PLAYERS];
new Logged[MAX_PLAYERS];
new LastShout[MAX_PLAYERS];
new AdminColor[MAX_PLAYERS];
new TempColor[MAX_PLAYERS];
new Citizen[MAX_PLAYERS];
new COP[MAX_PLAYERS];
new SWAT[MAX_PLAYERS];
new Robber[MAX_PLAYERS];
new gTeam[MAX_PLAYERS];
enum pooInfo
{
pRand,
};
new ShitInfo[MAX_PLAYERS][pooInfo];
main()
{
print("\n----------------------------------");
print(" Starter kit by Coole210");
print("----------------------------------\n");
}
SetPlayerToTeamColor(playerid)
{
if (gTeam[playerid] == TEAM_CITIZEN)
{
SetPlayerColor(playerid, TEAM_CITIZEN_COLOR);
}
if (gTeam[playerid] == TEAM_COP)
{
SetPlayerColor(playerid, TEAM_COP_COLOR);
}
if (gTeam[playerid] == TEAM_SWAT)
{
SetPlayerColor(playerid, TEAM_SWAT_COLOR);
}
if (gTeam[playerid] == TEAM_ROBBER)
{
SetPlayerColor(playerid, TEAM_ROBBER_COLOR);
}
}
public OnGameModeInit()
{
AddPlayerClassEx(TEAM_CITIZEN,2,1529.3446,-888.6906,61.1224,49.6362,0,0,0,0,0,0); // CITIZEN
AddPlayerClassEx(TEAM_COP,280,1553.2623,-1675.2860,16.1953,92.7704,0,0,0,0,0,0); // POLICE
AddPlayerClassEx(TEAM_SWAT,285,1553.2623,-1675.2860,16.1953,92.7704,0,0,0,0,0,0); // SWAT
AddPlayerClassEx(TEAM_ROBBER,50,2099.0171,-2005.4934,13.5469,131.0188,0,0,0,0,0,0); // Robber
SetGameModeText("Roleplay");
return 1;
}

public OnGameModeExit()
{
return 1;
}
SetPlayerTeamFromClass(playerid, classid)
{
switch(classid){
case 0:
{
gTeam[playerid] = TEAM_CITIZEN;
}
case 1:
{
gTeam[playerid] = TEAM_COP;
}
case 2:
{
gTeam[playerid] = TEAM_SWAT;
}
case 3:
{
gTeam[playerid] = TEAM_ROBBER;
}
}
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
PlayerPlaySound(playerid, 1187, 0,0,0);
SetPlayerTeamFromClass(playerid, classid);
SetPlayerPos(playerid,-2836.7632,2178.3101,176.3966);
SetPlayerFacingAngle(playerid, 36.8464);
SetPlayerCameraPos(playerid,-2840.6460,2183.3250,176.152;
SetPlayerCameraLookAt(playerid,-2836.7632,2178.3101,176.3966);
PlayerPlaySound(playerid, 1045, 0, 0, 0);
switch (classid) {
case 0:
{
GameTextForPlayer(playerid, "~w~Citizen",500, 3);
if(IsPlayerJob(playerid) == 1)
{
GameTextForPlayer(playerid, "~w~Citizen~n~~n~~n~~n~~n~~g~ Available for you]", 500, 3);
return 1;
}
else
{
GameTextForPlayer(playerid, "~w~Citizen~n~~n~~n~~n~~n~~r~ Not available for you]", 500, 3);
return 1;
}
}
case 1:
{
GameTextForPlayer(playerid, "~b~COP",500, 3);
if(IsPlayerJob(playerid) == 2)
{
GameTextForPlayer(playerid, "~b~COP~n~~n~~n~~n~~n~~g~ Available for you]", 500, 3);
return 1;
}
else
{
GameTextForPlayer(playerid, "~b~COP~n~~n~~n~~n~~n~~r~ Not available for you]", 500, 3);
return 1;
}
}
case 2:
{
GameTextForPlayer(playerid, "~b~S.W.A.T.",500, 3);
if(IsPlayerJob(playerid) == 3)
{
GameTextForPlayer(playerid, "~b~S.W.A.T.~n~~n~~n~~n~~n~~g~ Available for you]", 500, 3);
return 1;
}
else
{
GameTextForPlayer(playerid, "~b~S.W.A.T.~n~~n~~n~~n~~n~~r~ Not available for you]", 500, 3);
return 1;
}
}
case 3:
{
GameTextForPlayer(playerid, "~r~ROBBER",500, 3);
if(IsPlayerJob(playerid) == 4)
{
GameTextForPlayer(playerid, "~r~ROBBER~n~~n~~n~~n~~n~~g~ Available for you]", 500, 3);
return 1;
}
else
{
GameTextForPlayer(playerid, "~r~ROBBER~n~~n~~n~~n~~n~~r~ Not available for you]", 500, 3);
return 1;
}
}
}
return 1;
}

public OnPlayerRequestSpawn(playerid)
{
return 1;
}

public OnPlayerConnect(playerid)
{
ShitInfo[playerid][pRand] = 0;
RemovePlayerJob(playerid);
SendClientMessage(playerid,ADMIN_MSG,"[ ! ] Hello, this server uses the starter RP kit by Coole210. Enjoy !");
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
if(Logged[playerid])
{
dUserSetINT(PlayerName(playerid)).("Money",GetPlay erMoney(playerid));
dUserSetINT(PlayerName(playerid)).("Interior",GetP layerInterior(playerid));
dUserSetINT(PlayerName(playerid)).("Job",IsPlayerJ ob(playerid));
dUserSetINT(PlayerName(playerid)).("Admin",GetPlay erAdminz(playerid));
}
RemovePlayerJob(playerid);
return 1;
}

public OnPlayerSpawn(playerid)
{
SetPlayerToTeamColor(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[])
{
if(ShitInfo[playerid][pRand] == 0)
{
new string[256];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"%s: %s",name,text);
ProxDetector(20.0,playerid,string,GetPlayerColor(p layerid),GetPlayerColor(playerid),GetPlayerColor(p layerid),GetPlayerColor(playerid),GetPlayerColor(p layerid));
return 0;
}
return 1;
}

public OnPlayerPrivmsg(playerid, recieverid, text[])
{
return 1;
}
dcmd_register(playerid,params[]) {
if (Logged[playerid]) return SystemMsg(playerid,"Already Logged in !");
if (udb_Exists(PlayerName(playerid))) return SystemMsg(playerid,"Account already exists, please use '/login password'.");
if (strlen(params)==0) return SystemMsg(playerid,"Correct usage: '/register password'");
if (udb_Create(PlayerName(playerid),params)) return SystemMsg(playerid,"Account successfully created. Login with '/login password' now.") && SetPlayerJob(playerid, 1);
return 1;
}
dcmd_login(playerid,params[]) {
if (Logged[playerid]) return SystemMsg(playerid,"Already Logged in!");
if (!udb_Exists(PlayerName(playerid))) return SystemMsg(playerid,"[ ! ] Account doesn't exist, please use '/register password'.");
if (strlen(params)==0) return SystemMsg(playerid,"[ ! ] Correct usage: '/login password'");
if (udb_CheckLogin(PlayerName(playerid),params)) {
GivePlayerMoney(playerid,dUserINT(PlayerName(playe rid)).("Money")-GetPlayerMoney(playerid));
GivePlayerAdminz(playerid,dUserINT(PlayerName(play erid)).("Admin")-GetPlayerAdminz(playerid));
SetPlayerInterior(playerid,dUserINT(PlayerName(pla yerid)).("Interior")-GetPlayerInterior(playerid));
SetPlayerJob(playerid,dUserINT(PlayerName(playerid )).("Job")-IsPlayerJob(playerid));
Logged[playerid]=true;
return SendClientMessage(playerid,ADMIN_MSG,"[ ! ] Access granted ! You're now logged in !");
}
return SystemMsg(playerid,"[ ! ] Login failed!");
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];
dcmd(login,5,cmdtext);
dcmd(register,8,cmdtext);
new cmd[128], tmp[128], idx;
cmd = strtok(cmdtext, idx);
if(!strcmp("/job", cmd, true)) if(Logged[playerid] == 1)
{
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "[ ! ] USAGE: /job <JobName>") && SendClientMessage(playerid,COLOR_WHITE,"[ ! ] List of jobs: cop, swat, robber");
if (!strcmp("cop", tmp, true)) if(IsPlayerJob(playerid) == 9)
{
if(GetPlayerMoney(playerid) <= 25) return SendClientMessage(playerid,COLOR_RED,"[ ! ] Not enough Money! You need 2000!");
GivePlayerMoney(playerid, -2000);
RemovePlayerJob(playerid);
SetPlayerJob(playerid,2);
SendClientMessage(playerid,TEAM_COP_COLOR,"[ ! ] Cheif of police: Welcome to officer son !");
SendClientMessage(playerid,ADMIN_MSG,"[ ! ] You are kicked for ( PLEASE RESTART GAME )");
Kick(playerid);
return 1;
}
if (!strcmp("swat", tmp, true)) if(IsPlayerJob(playerid) == 9)
{
if(GetPlayerMoney(playerid) <= 25) return SendClientMessage(playerid,COLOR_RED,"[ ! ] Not enough Money ! You need 2000!");
GivePlayerMoney(playerid, -2000);
RemovePlayerJob(playerid);
SetPlayerJob(playerid,3);
SendClientMessage(playerid,TEAM_SWAT_COLOR,"[ ! ] Military: Welcome to S.W.A.T. force !");
SendClientMessage(playerid,ADMIN_MSG,"[ ! ] You are kicked for ( PLEASE RESTART GAME )");
Kick(playerid);
return 1;
}
if (!strcmp("robber", tmp, true)) if(IsPlayerJob(playerid) == 9)
{
if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid,COLOR_RED,"[ ! ] Not enough Money! You need 2000!");
GivePlayerMoney(playerid, -2000);
RemovePlayerJob(playerid);
SetPlayerJob(playerid,4);
SendClientMessage(playerid,TEAM_ROBBER_COLOR,"[ ! ] Theif: Welcome to robber !");
SendClientMessage(playerid,ADMIN_MSG,"[ ! ] You are kicked for ( PLEASE RESTART GAME )");
Kick(playerid);
return 1;
}
}
if(strcmp(cmd, "/aheal", true) == 0) // Admin heal
{
if(GetPlayerAdminz(playerid) < 1) return 0; // returns 0 so it says "SERVER: Unknown command." so people don't know this command exists!
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) // If they don't give a playerid
{
SendClientMessage(playerid,COLOR_WHITE,"USAGE: /aheal [playerid]");
return 1;
}
new playa = strval(tmp); // This just replaces strval, so you use playa instead of strval(tmp) [Shorter]
if(IsPlayerConnected(playa)) // Checks if player is connected !
{
if(playa == playerid) return SendClientMessage(playerid,COLOR_RED,"[ ! ] You cannot heal yourself !"); // Self explanitory..
SetPlayerHealth(playa,100.0); // Heals player
SendClientMessage(playa,ADMIN_MSG,"[ ! ] You are healed by an admin!"); // Sends message to player saying they are healed.
return 1;
}
else
{
SendClientMessage(playerid,COLOR_RED,"Invalid Player ID!"); // If there is no ID for the player or if there not connected.
}
return 1;
}
// /goto same type of thing just like /aheal except it uses variables to get to other players..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)