Im in need of Help
#1

Can somebody please help me? Im coding a tutorial using SetTimerEx and im getting errors. Could someone help?

Код:
new TutorialStart[MAX_PLAYERS];
new Tutorial1Timer[MAX_PLAYERS];
new Tutorial2Timer[MAX_PLAYERS];
new Tut1[MAX_PLAYERS];
new Tut2[MAX_PLAYERS];

forward TutStart(playerid);
public TutStart(playerid)
{
    KillTimer(TutorialStart[playerid]);
	SendClientMessage(playerid, -1, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
	SendClientMessage(playerid, -1, "{FF0000}Dobrodoslica");
    SendClientMessage(playerid, -1, "{00FFFF}=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
    SendClientMessage(playerid, -1, "{FFFFFF}Dobrodosli na {00FF00}Alien Balkan {FFFFFF}RolePlay!");
    SendClientMessage(playerid, -1, "{FFFFFF}Ovaj server je {FF0000}RolePlay{FFFFFF}, sto znaci {FF0000}simuliranje stvarno zivota{FFFFFF}.");
    SendClientMessage(playerid, -1, "{FFFFFF}Skripteri ovoga servera jesu {FF0000}Marko {FFFFFF}& {FF0000}Jony{FFFFFF}.");
    SendClientMessage(playerid, -1, "{FFFFFF}Maper ovoga servera jeste {FF0000}Marko{FFFFFF}.");
    SendClientMessage(playerid, -1, "{FFFFFF}Bice vam prikazan {FF0000}kratak tutorijal{FFFFFF}.");
    SendClientMessage(playerid, -1, "{00FFFF}=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
	Tutorial1Timer[playerid] = SetTimerEx("Tut1", 10000, true, "d", playerid);
	return 1;
}

forward Tut1(playerid);
public Tut1(playerid)
{
	KillTimer(Tutorial1Timer[playerid]);
	SendClientMessage(playerid, -1, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
	SendClientMessage(playerid, -1, "{FF0000}Opstina");
	SendClientMessage(playerid, -1, "{00FFFF}=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
	SendClientMessage(playerid, -1, "{FF0000}Opstina {FFFFFF}je mesto koje se najvise posecuje.");
	SendClientMessage(playerid, -1, "{FFFFFF}U {FF0000}Opstini {FFFFFF}se mozete zaposliti.");
	SendClientMessage(playerid, -1, "{FFFFFF}U {FF0000}Opstini {FFFFFF}takodje se moze raditi jos nesto poput:");
	SendClientMessage(playerid, -1, "{FF0000}Izlazenje iz organizacije{FFFFFF}, {FF0000}Otkaz{FFFFFF}, itd...");
	SendClientMessage(playerid, -1, "{FFFFFF}Ako nemate para, bolje se zaposlite :)");
	SendClientMessage(playerid, -1, "{00FFFF}=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
	Tutorial2Timer[playerid] = SetTimerEx("Tut2", 10000, true, "d", playerid);
	return 1;
}
The Errors:
Код:
C:\Users\CB\Desktop\Jonyjev Mod\gamemodes\ABRP.pwn(182) : error 021: symbol already defined: "Tut1"
C:\Users\CB\Desktop\Jonyjev Mod\gamemodes\ABRP.pwn(183) : error 021: symbol already defined: "Tut1"
C:\Users\CB\Desktop\Jonyjev Mod\gamemodes\ABRP.pwn(196) : error 010: invalid function or declaration
C:\Users\CB\Desktop\Jonyjev Mod\gamemodes\ABRP.pwn(292) : warning 203: symbol is never used: "Tut1"
C:\Users\CB\Desktop\Jonyjev Mod\gamemodes\ABRP.pwn(292) : warning 203: symbol is never used: "Tut2"
C:\Users\CB\Desktop\Jonyjev Mod\gamemodes\ABRP.pwn(292) : warning 203: symbol is never used: "Tutorial2Timer"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Reply
#2

PHP код:
forward TutStart(playerid);
public 
TutStart(playerid)
{
    
KillTimer(TutorialStart[playerid]);
    
SendClientMessage(playerid, -1"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
    
SendClientMessage(playerid, -1"{FF0000}Dobrodoslica");
    
SendClientMessage(playerid, -1"{00FFFF}=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
    
SendClientMessage(playerid, -1"{FFFFFF}Dobrodosli na {00FF00}Alien Balkan {FFFFFF}RolePlay!");
    
SendClientMessage(playerid, -1"{FFFFFF}Ovaj server je {FF0000}RolePlay{FFFFFF}, sto znaci {FF0000}simuliranje stvarno zivota{FFFFFF}.");
    
SendClientMessage(playerid, -1"{FFFFFF}Skripteri ovoga servera jesu {FF0000}Marko {FFFFFF}& {FF0000}Jony{FFFFFF}.");
    
SendClientMessage(playerid, -1"{FFFFFF}Maper ovoga servera jeste {FF0000}Marko{FFFFFF}.");
    
SendClientMessage(playerid, -1"{FFFFFF}Bice vam prikazan {FF0000}kratak tutorijal{FFFFFF}.");
    
SendClientMessage(playerid, -1"{00FFFF}=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
    
Tutorial1Timer[playerid] = SetTimerEx("Tut1_Start"10000true"d"playerid);
    return 
1;
}
forward Tut1_Start(playerid);
public 
Tut1_Start(playerid)
{
    
KillTimer(Tutorial1Timer[playerid]);
    
SendClientMessage(playerid, -1"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
    
SendClientMessage(playerid, -1"{FF0000}Opstina");
    
SendClientMessage(playerid, -1"{00FFFF}=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
    
SendClientMessage(playerid, -1"{FF0000}Opstina {FFFFFF}je mesto koje se najvise posecuje.");
    
SendClientMessage(playerid, -1"{FFFFFF}U {FF0000}Opstini {FFFFFF}se mozete zaposliti.");
    
SendClientMessage(playerid, -1"{FFFFFF}U {FF0000}Opstini {FFFFFF}takodje se moze raditi jos nesto poput:");
    
SendClientMessage(playerid, -1"{FF0000}Izlazenje iz organizacije{FFFFFF}, {FF0000}Otkaz{FFFFFF}, itd...");
    
SendClientMessage(playerid, -1"{FFFFFF}Ako nemate para, bolje se zaposlite :)");
    
SendClientMessage(playerid, -1"{00FFFF}=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
    
Tutorial2Timer[playerid] = SetTimerEx("Tut2_Start"10000true"d"playerid);
    return 
1;

You defined Tut1 as a variable so you can't use this as a callback. And: Tut2 => Tut2_Start
Reply
#3

Thanks for the quick reply. It works now, thank you very very much
Rep+
Reply
#4

Also, how can i force the player to spawn? I have tried 'SpawnPlayer' and 'SpawnPlayerInfo' (or whatever its called) but it still aint forcing him to spawn. Any ideas?
Reply
#5

I don't know what you may, but try this function after you spawned this player.
PHP код:
SetCameraBehindPlayer(playerid); 
Reply
#6

Nevermind, it worked. After the Tutorial it spawned him in. Usually if i put SpawnPlayer(playerid) in DIALOG_REGISTER it doesnt work. Again, thanks for a fast reply.
Reply
#7

The problem is solved, or?
Reply
#8

Yes, but i have another. Sorry for asking alot of probably easy questions, but, heres the problem:
- Link To The Picture -
http://imgur.com/0HqTmMz

How do i remove the yellow markers and going in the 'interiors' or 'houses'...
Reply
#9

Under "OnGameModeInit" add : DisableInteriorEnterExits();
Reply
#10

Quote:
Originally Posted by Theepiccoder
Посмотреть сообщение
Yes, but i have another. Sorry for asking alot of probably easy questions;
No problem, for this we are here.

Quote:
Originally Posted by Theepiccoder
Посмотреть сообщение
and going in the 'interiors' or 'houses'...
When you disabled the yellow markers you can set your own markers (CreatePickup). If you want to enter the houses with a key or command you have to script this and teleport the player (SetPlayerPos; SetPlayerInterior; SetPlayerVirtualWorld(?)). When you have questions you can ask us.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)