Script can be built like that?
#1

Script can be built like that? Or becuase of that my script Gamemode is "Unknown"?

Script:

Код:
			/*  ---------------- SCRIPT REVISION ----------------- */

// Do not forget to change this everytime you commit - it's mandatory!

#define SERVER_GM_TEXT "RP v2.1"

#include <a_samp>
main( ) { }

#include <a_mysql>
#include <streamer>
#include <yom_buttons>
#include <ZCMD>
#include <sscanf2>
#include <foreach>
#include <YSI\y_timers>
#include <YSI\y_utils>
#if defined SOCKET_ENABLED
#include <socket>
//End

#include "./includes/defines.pwn"
#include "./includes/enums.pwn"
#include "./includes/variables.pwn"
#include "./includes/timers.pwn"
#include "./includes/functions.pwn"
#include "./includes/commands.pwn"
#include "./includes/mysql.pwn"
#include "./includes/OnPlayerLoad.pwn"
#include "./includes/callbacks.pwn"
#include "./includes/textdraws.pwn"
#include "./includes/streamer.pwn"
#include "./includes/OnDialogResponse.pwn"


public OnGameModeInit()
{
	print("Preparing the gamemode, please wait...");
	g_mysql_Init();
	return 1;
}

public OnGameModeExit()
{
    g_mysql_Exit();
	return 1;
}
#endif
Server.cfg:
Код:
echo Executing Server Config...
lanmode 0
rcon_password dswewew
maxplayers 50
port 7785
hostname My Server
bind 66.225.195.125
gamemode0 MyScript
filterscripts yom_buttons gcustom
plugins streamer sscanf mysql Whirlpool
announce 1
query 1
weburl Coming Soon
maxnpc 0
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
rcon 0
sleep 1
mapname San Andreas
Server Logs:
Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3x-R2, ©2005-2013 SA-MP Team

[01:29:14] 
[01:29:14] Server Plugins
[01:29:14] --------------
[01:29:14]  Loading plugin: streamer
[01:29:14] 

*** Streamer Plugin v2.6.1 by Incognito loaded ***

[01:29:14]   Loaded.
[01:29:14]  Loading plugin: sscanf
[01:29:14] 

[01:29:14]  ===============================

[01:29:14]       sscanf plugin loaded.     

[01:29:14]    © 2009 Alex "******" Cole

[01:29:14]    0.3d-R2 500 Players "dnee"

[01:29:14]  ===============================

[01:29:14]   Loaded.
[01:29:14]  Loading plugin: mysql
[01:29:14] 

  > MySQL plugin R7 successfully loaded.

[01:29:14]   Loaded.
[01:29:14]  Loading plugin: Whirlpool
[01:29:14]  
[01:29:14]  ==================
[01:29:14]  
[01:29:14]   Whirlpool loaded
[01:29:14]  
[01:29:14]  ==================
[01:29:14]  
[01:29:14]   Loaded.
[01:29:14]  Loaded 4 plugins.

[01:29:14] 
[01:29:14] Filterscripts
[01:29:14] ---------------
[01:29:14]   Loading filterscript 'yom_buttons.amx'...
[01:29:14]   Loading filterscript 'gcustom.amx'...
[01:29:14]   Loaded 2 filterscripts.

[01:29:14]  
[01:29:14]  ======================================= 
[01:29:14]  |                                     | 
[01:29:14]  |        YSI version 3.01.0002        | 
[01:29:14]  |        By Alex "******" Cole        | 
[01:29:14]  |                                     | 
[01:29:14]  ======================================= 
[01:29:14]  
[01:29:14] Script[gamemodes/MyScript.amx]: Run time error 20: "Invalid index parameter (bad entry point)"
[01:29:14] Number of vehicle models: 0
[01:29:15]  
[01:29:15]  ========================================== 
[01:29:15]
Using MySQL Database too... Please help me cuz in logs it should write me : "Loaded from MySQL Vehicles/ETC..."
Reply
#2

There is no code in the gamemode...
You have to have coding to tell the server what must happen, when and how it must.
Reply
#3

/include/ - not /includes/

EDIT: Also rename your include folder if it is called "includes", it can cause errors.
Reply
#4

That works very well and this explains it
pawn Код:
#include "./includes/defines.pwn"
#include "./includes/enums.pwn"
#include "./includes/variables.pwn"
#include "./includes/timers.pwn"
#include "./includes/functions.pwn"
#include "./includes/commands.pwn"
#include "./includes/mysql.pwn"
#include "./includes/OnPlayerLoad.pwn"
#include "./includes/callbacks.pwn"
#include "./includes/textdraws.pwn"
#include "./includes/streamer.pwn"
#include "./includes/OnDialogResponse.pwn"
every function lays in your 'includes' not 'include' it would compile perfectly if you had those so called includes.
Reply
#5

Think that your server needs specefic callbakcs (OnPlayerSpawn, OnPlayerRequestClass...) and those aren't optionnal !

If they aren't yet in your Gamemode, add them !
Reply
#6

You guys are such morons, if you dont know anything don't write anything his gamemode is perfect he is defining functions putting callbacks all in those includes all he needs is the 'includes' folder which he dosent have i guess not the include folder the include(s) includes folder
Reply
#7

Same, I changed all those lines and the same, I changed from Includes/ to include/, I think the problem is in MySQL but MySQL can cuz the gamemode to be unknown?
Reply
#8

Firstly, if you mean writing callbacks, functions, variables and etc in include files and then linking them to the main GM by "like this", then yes it can be; actually, I've written a GM this way and it worked very well.

As for the runtime error, I'd like to ask you a question. Do you have a folder called "includes" in the pawno include folder (\your server folder\pawno\include\)? And if you have one, does it have files with these names (enums variables etc..)?
Reply
#9

Add
pawn Код:
main(){}
before OnGameModeInit and then compile and see if it works.

Edit: it seems you already have main(){},after including a_samp..and it should work and not give you that error..try moving it before OnGameModeInit,maybe it works..
Reply
#10

Quote:
Originally Posted by Rapeassboi
Посмотреть сообщение
You guys are such morons, if you dont know anything don't write anything his gamemode is perfect he is defining functions putting callbacks all in those includes all he needs is the 'includes' folder which he dosent have i guess not the include folder the include(s) includes folder
This is just NGRP so it's not his gamemode in anyway, it is a good way to use includes but NGRP gamemode does it completely wrong by combining multiple systems in the same include far from perfect when each include should be it's own module.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)