SA-MP Forums Archive
Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Archive (https://sampforum.blast.hk/forumdisplay.php?fid=88)
+---- Thread: Problem (/showthread.php?tid=140861)



Problem - [CB]Carrera - 10.04.2010

E ovako, počeo sam raditi GM od 0.. uradio sam login/register, tut i par komandi, kompaliro sve ok bez erora i kad pokrenem server i uđem u njega ne otvara se a u onom crnom prozoru piљe neљta ko eror


http://www.imagesforme.com/show.php/1073229_.bmp


Re: Problem - Correlli - 10.04.2010

Zaboravio si na main() funkciju u gamemodu.

pawn Code:
main()
{
  print("\nmain() funkcija.");
}



Re: Problem - [CB]Carrera - 10.04.2010

A dje to ide, u koji dio skripte ?


Re: Problem - Correlli - 10.04.2010

Samo gledaj da bude izvan funkcije/callbacka. Najbolje je da ju staviљ ispod include i define linija.

Primjer:
pawn Code:
#include "a_samp"

#define TEAM_COP (0)
#define TEAM_MAFIA (1)

main() { }

/* ostalo */



Re: Problem - [CB]Carrera - 11.04.2010

Sad mi pojavi Run time error 17: ''Invalid/unsupported P-code file format


Re: Problem - Correlli - 11.04.2010

Napravio si neku greљku, pogledaj ovaj topik - http://forum.sa-mp.com/index.php?topic=81728.0


Re: Problem - [CB]Carrera - 11.04.2010

Pronaљo sam greљku i rijeљio al mi pojavi opet onaj eror 20, vjerovatno nisam na pravo mjesto unio main

Code:
// Moj GM 2
// Las Vegas RolePlay
// By Elmedin
#include <a_samp>

#if defined FILTERSCRIPT
#if defined COLOR_WHITE 0xFFFFFFAA
#if defined PlayerInfo

main()
{
  print("\nmain() funkcija.");
}
#endif
public OnGameModeInit()
{
  print("Gamemode started!");
  return 1;
}
public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Las Vegas RolePlay");
	print("--------------------------------------\n");
	return 1;
}

#else
#endif
public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1567.8416, -1887.0773, 13.5582);
	SetPlayerCameraPos(playerid, 1567.8416, -1887.0773, 13.5582);
	SetPlayerCameraLookAt(playerid, 1567.8416, -1887.0773, 13.5582);
	return 1;
}
Eto par redova pa moћe neko napisati kako treba pravilno


Re: Problem - Correlli - 11.04.2010

Naravno da ne radi, jer PlayerInfo nikad nije definiran.

pawn Code:
// Moj GM 2
// Las Vegas RolePlay
// By Elmedin
#include <a_samp>

#define COLOR_WHITE 0xFFFFFFAA

main()
{
  print("\nmain() funkcija.");
}

public OnGameModeInit()
{
  print("Gamemode started!");
  return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
  SetPlayerPos(playerid, 1567.8416, -1887.0773, 13.5582);
  SetPlayerCameraPos(playerid, 1567.8416, -1887.0773, 13.5582);
  SetPlayerCameraLookAt(playerid, 1567.8416, -1887.0773, 13.5582);
  return 1;
}

/* i tako dalje.. */
Vjerojatno si ovako mislio.