25.01.2015, 18:44
run time error 20 |console| i need help
25.01.2015, 18:45
1) You already loaded the sscanf plugin. 2) Add main() {} to your gamemode. It can be empty but it must be there.
25.01.2015, 18:47
Seems you don't have main in your script.
add it above OnGameModeInit
pawn Код:
main( ) { }
25.01.2015, 23:40
(
Последний раз редактировалось ayoub001; 26.01.2015 в 00:31.
)
Quote:
1) You already loaded the sscanf plugin. 2) Add main() {} to your gamemode. It can be empty but it must be there.
|

i saw a note sead that // Don't use these lines if it's a filterscript what shoud i do?
Код:
#define FILTERSCRIPT #include <a_samp> #include <a_players> #include <file> #include <YSI\y_ini> //#include <sscanf2> #include <sscanf> //#define MAX_INI_ENTRY_TEXT 160 #define DIALOG_REGISTER 1 #define DIALOG_LOGIN 2 #define DIALOG_SUCCESS_1 3 #define DIALOG_SUCCESS_2 4 #define PATH "/Accounts/%s.ini" //#define PATH ~/Accounts/%s.ini #define COLOR_WHITE "(FFFFFF)" #define COLOR_RED "(F81414)" #define COLOR_GREEN "(00FF22)" #define COLOR_LIGHTBLUE "(00CED1)" #pragma tabsize 0 new plc=0; //#if defined FILTERSCRIPT #include <time> enum pInfo { pPass, pCash, pAdmin, pScore, pBankmoney, pBanned, } new PlayerInfo[MAX_PLAYERS][pInfo]; forward LoadUser_data(playerid,name[],value[]); public LoadUser_data(playerid,name[],value[]) { INI_Int("Password",PlayerInfo[playerid][pPass]); INI_Int("Cash",PlayerInfo[playerid][pCash]); INI_Int("Admin",PlayerInfo[playerid][pAdmin]); INI_Int("Score",PlayerInfo[playerid][pScore]); INI_Int("Bankmoney",PlayerInfo[playerid][pBankmoney]); INI_Int("Banned",PlayerInfo[playerid][pBanned]); return 1; } stock UserPath(playerid) { new string[265],playername[MAX_PLAYER_NAME]; GetPlayerName(playerid,playername,sizeof(playername)); format(string,sizeof(string),PATH,playername); return string; } stock udb_hash(buf[]) { new length=strlen(buf); new s1 = 1; new s2 = 0; new n; for (n=0; n<length; n++) { s1 = (s1 + buf[n]) % 65521; s2 = (s2 + s1) % 65521; } return (s2 << 16) + s1; } public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Shadow**server"); print("--------------------------------------\n"); return 1; } //#else main() { print("\n----------------------------------"); print(" cops and robbers"); print("----------------------------------\n"); } /*#endif main() { print(" cops and robbers"); }*/ public OnGameModeInit() { // Don't use these lines if it's a filterscript //SetGameModeText("COPS AND ROBBERS"); AddPlayerClass(0,-1651.9706,1203.7932,7.2500,271.8879,23,1000,27,1000,31,5000,32,5000,34,5000); // AddStaticVehicle(502,-1660.0577,1212.5298,7.1436,297.6662,58,67); // AddStaticVehicle(471,-1589.0851,1240.4082,6.6640,90.2106,74,83); // AddStaticVehicle(471,-1589.2880,1243.2778,6.6634,89.9255,74,83); // AddStaticVehicle(471,-1589.1378,1248.2932,6.6617,267.6974,74,83); // AddStaticVehicle(471,-1589.0992,1251.9180,6.6632,92.4942,74,83); // AddStaticVehicle(415,-1554.5667,1188.8629,6.9594,84.9803,92,1); // AddStaticVehicle(522,-1655.3507,1213.4152,13.2333,307.4940,3,3); // AddStaticVehicle(522,-1648.1802,1207.0840,13.2366,245.4331,3,3); // AddStaticVehicle(522,-1622.9944,1220.5488,6.7385,225.0322,3,3); // AddStaticVehicle(522,-1628.2808,1225.8075,6.7611,46.0962,3,3); // AddStaticVehicle(522,-1622.9944,1220.5488,6.7385,225.0322,3,3); AddPlayerClass(27,-2057.7261,
26.01.2015, 00:26
You Have 2 Mains...
26.01.2015, 00:32
26.01.2015, 01:25
The INCLUDE is "sscanf2"
The PLUGIN is "sscanf"
In your script, you should have:
In your server.cfg, you should have:
--
The PLUGIN is "sscanf"
In your script, you should have:
pawn Код:
#include <sscanf2>
Код:
plugins sscanf
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
#include <a_players>
#include <file>
#include <YSI\y_ini>
#include <sscanf2>
//#define MAX_INI_ENTRY_TEXT 160
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4
#define PATH "/Accounts/%s.ini" //#define PATH ~/Accounts/%s.ini
#define COLOR_WHITE "(FFFFFF)"
#define COLOR_RED "(F81414)"
#define COLOR_GREEN "(00FF22)"
#define COLOR_LIGHTBLUE "(00CED1)"
new plc=0;
#include <time>
enum pInfo
{
pPass,
pCash,
pAdmin,
pScore,
pBankmoney,
pBanned,
}
new PlayerInfo[MAX_PLAYERS][pInfo];
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Password",PlayerInfo[playerid][pPass]);
INI_Int("Cash",PlayerInfo[playerid][pCash]);
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
INI_Int("Score",PlayerInfo[playerid][pScore]);
INI_Int("Bankmoney",PlayerInfo[playerid][pBankmoney]);
INI_Int("Banned",PlayerInfo[playerid][pBanned]);
return 1;
}
stock UserPath(playerid)
{
new string[265],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string,sizeof(string),PATH,playername);
return string;
}
stock udb_hash(buf[])
{
new length=strlen(buf);
new s1 = 1;
new s2 = 0;
new n;
for (n=0; n<length; n++)
{
s1 = (s1 + buf[n]) % 65521;
s2 = (s2 + s1) % 65521;
}
return (s2 << 16) + s1;
}
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Shadow**server");
print("--------------------------------------\n");
return 1;
}
#else
public OnGameModeInit()
{
//SetGameModeText("COPS AND ROBBERS");
AddPlayerClass(0,-1651.9706,1203.7932,7.2500,271.8879,23,1000,27,1000,31,5000,32,5000,34,5000); //
AddStaticVehicle(502,-1660.0577,1212.5298,7.1436,297.6662,58,67); //
AddStaticVehicle(471,-1589.0851,1240.4082,6.6640,90.2106,74,83); //
AddStaticVehicle(471,-1589.2880,1243.2778,6.6634,89.9255,74,83); //
AddStaticVehicle(471,-1589.1378,1248.2932,6.6617,267.6974,74,83); //
AddStaticVehicle(471,-1589.0992,1251.9180,6.6632,92.4942,74,83); //
AddStaticVehicle(415,-1554.5667,1188.8629,6.9594,84.9803,92,1); //
AddStaticVehicle(522,-1655.3507,1213.4152,13.2333,307.4940,3,3); //
AddStaticVehicle(522,-1648.1802,1207.0840,13.2366,245.4331,3,3); //
AddStaticVehicle(522,-1622.9944,1220.5488,6.7385,225.0322,3,3); //
AddStaticVehicle(522,-1628.2808,1225.8075,6.7611,46.0962,3,3); //
AddStaticVehicle(522,-1622.9944,1220.5488,6.7385,225.0322,3,3);
//Your other stuff here...
return 1;
}
main()
{
print("\n----------------------------------");
print(" cops and robbers");
print("----------------------------------\n");
return 1;
}
#endif
26.01.2015, 14:34
Quote:
The INCLUDE is "sscanf2"
The PLUGIN is "sscanf" In your script, you should have: pawn Код:
Код:
plugins sscanf pawn Код:
|
27.01.2015, 06:58
I don't see any login/register window in the code... therefore the problem is not in my code...
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)