(Newbie) Error fix needed!
#1

Hey guys so i made this. And i need help to get this into my server but yeah as always lovely errors, dont tell me that im an idiot couse i know that im a beginner in this

PHP код:
//N-L CNR Cinema
//Defines
#define RemoveBuildingForPlayer
#define CreateDynamicObject
//Removals
RemoveBuildingForPlayer(playerid10946, -2076.6563354.367235.78910.25);
RemoveBuildingForPlayer(playerid11024, -2076.2734359.320344.59380.25);
RemoveBuildingForPlayer(playerid11403, -2076.6563354.367235.78910.25);
RemoveBuildingForPlayer(playerid3868, -2120.7656336.867249.15630.25);
RemoveBuildingForPlayer(playerid3868, -2103.3281336.867249.15630.25);
RemoveBuildingForPlayer(playerid3868, -2032.2891336.867249.15630.25);
RemoveBuildingForPlayer(playerid3868, -2022.0859347.132849.15630.25);
RemoveBuildingForPlayer(playerid3868, -2022.0859364.578149.15630.25);
RemoveBuildingForPlayer(playerid3868, -2032.2969380.742249.15630.25);
RemoveBuildingForPlayer(playerid3868, -2131.1797347.281349.15630.25);
RemoveBuildingForPlayer(playerid3868, -2131.1797364.726649.15630.25);
RemoveBuildingForPlayer(playerid3868, -2049.7344336.867249.15630.25);
RemoveBuildingForPlayer(playerid3867, -2131.1797347.281349.15630.25);
RemoveBuildingForPlayer(playerid3867, -2120.7656336.867249.15630.25);
RemoveBuildingForPlayer(playerid3867, -2103.3281336.867249.15630.25);
RemoveBuildingForPlayer(playerid3867, -2049.7344336.867249.15630.25);
RemoveBuildingForPlayer(playerid3867, -2032.2891336.867249.15630.25);
RemoveBuildingForPlayer(playerid3867, -2022.0859347.132849.15630.25);
RemoveBuildingForPlayer(playerid3867, -2131.1797364.726649.15630.25);
RemoveBuildingForPlayer(playerid10949, -2076.2734359.320344.59380.25);
RemoveBuildingForPlayer(playerid3867, -2032.2969380.742249.15630.25);
RemoveBuildingForPlayer(playerid3867, -2022.0859364.578149.15630.25);
//New Objects
CreateDynamicObject(19340, -2061.02075416.8410029.80970,   1.000000.00000180.00000);
CreateDynamicObject(19340, -2092.90918416.8565129.81910,   1.000000.00000180.00000);
CreateDynamicObject(8656, -2122.12256330.5152036.06490,   0.00000, -1.00000, -90.00000);
CreateDynamicObject(8656, -2136.88403367.8103035.40390,   -1.000000.000000.00000);
CreateDynamicObject(8656, -2136.89355345.3866935.80490,   -1.000000.000000.00000);
CreateDynamicObject(8656, -2031.89868395.9491035.26490,   0.00000, -1.00000, -90.00000);
CreateDynamicObject(8656, -2120.36279403.7479935.22490,   0.00000, -1.00000, -90.00000);
CreateDynamicObject(8656, -2093.88647330.4982936.06490,   0.00000, -1.00000, -90.00000);
CreateDynamicObject(8656, -2114.54028397.4743334.94390,   -1.000000.000000.00000);
CreateDynamicObject(8656, -2017.04688345.2543035.80490,   -1.000000.000000.00000);
CreateDynamicObject(8656, -2063.34766330.4984136.06490,   0.00000, -1.00000, -90.00000);
CreateDynamicObject(8656, -2063.51343382.4700935.22490,   0.00000, -1.00000, -90.00000);
CreateDynamicObject(8656, -2082.89648382.4814135.22490,   0.00000, -1.00000, -90.00000);
CreateDynamicObject(8656, -2017.05908366.6586035.40389,   -1.000000.000000.00000);
CreateDynamicObject(8656, -2058.36304397.5965034.94390,   -1.000000.000000.00000);
CreateDynamicObject(8656, -2102.04663382.4700035.22490,   0.00000, -1.00000, -90.00000);
CreateDynamicObject(8656, -2032.80579330.4999136.06490,   0.00000, -1.00000, -90.00000);
CreateDynamicObject(8656, -2042.91479395.9480935.26490,   0.00000, -1.00000, -90.00000);
CreateDynamicObject(8496, -2081.91748376.6835940.87480,   0.000000.000000.00000);
CreateDynamicObject(1536, -2083.03076357.6498134.58430,   0.000000.000000.00000);
CreateDynamicObject(1536, -2080.02222357.6897934.58430,   0.000000.00000180.00000); 
And On compile i get this:

PHP код:
C:\Users\WeeD\Desktop\Okay\Mans CNR serveris\filterscripts\center.pwn(9) : error 010invalid function or declaration
C
:\Users\WeeD\Desktop\Okay\Mans CNR serveris\filterscripts\center.pwn(32) : error 010invalid function or declaration
C
:\Users\WeeD\Desktop\Okay\Mans CNR serveris\filterscripts\center.pwn(53) : error 013no entry point (no public functions)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
3 Errors

Reply
#2

You probably have no idea what you're exactly doing. You need Incognito's streamer plugin for using CreateDynamicObject. You cannot define like that and you also have to include the includes in the script in order to compile properly.

pawn Код:
#include <a_samp>
#include <streamer>

public OnFilterScriptInit() {
    //New Objects
    CreateDynamicObject(19340, -2061.02075, 416.84100, 29.80970,   1.00000, 0.00000, 180.00000);
    CreateDynamicObject(19340, -2092.90918, 416.85651, 29.81910,   1.00000, 0.00000, 180.00000);
    CreateDynamicObject(8656, -2122.12256, 330.51520, 36.06490,   0.00000, -1.00000, -90.00000);
    CreateDynamicObject(8656, -2136.88403, 367.81030, 35.40390,   -1.00000, 0.00000, 0.00000);
    CreateDynamicObject(8656, -2136.89355, 345.38669, 35.80490,   -1.00000, 0.00000, 0.00000);
    CreateDynamicObject(8656, -2031.89868, 395.94910, 35.26490,   0.00000, -1.00000, -90.00000);
    CreateDynamicObject(8656, -2120.36279, 403.74799, 35.22490,   0.00000, -1.00000, -90.00000);
    CreateDynamicObject(8656, -2093.88647, 330.49829, 36.06490,   0.00000, -1.00000, -90.00000);
    CreateDynamicObject(8656, -2114.54028, 397.47433, 34.94390,   -1.00000, 0.00000, 0.00000);
    CreateDynamicObject(8656, -2017.04688, 345.25430, 35.80490,   -1.00000, 0.00000, 0.00000);
    CreateDynamicObject(8656, -2063.34766, 330.49841, 36.06490,   0.00000, -1.00000, -90.00000);
    CreateDynamicObject(8656, -2063.51343, 382.47009, 35.22490,   0.00000, -1.00000, -90.00000);
    CreateDynamicObject(8656, -2082.89648, 382.48141, 35.22490,   0.00000, -1.00000, -90.00000);
    CreateDynamicObject(8656, -2017.05908, 366.65860, 35.40389,   -1.00000, 0.00000, 0.00000);
    CreateDynamicObject(8656, -2058.36304, 397.59650, 34.94390,   -1.00000, 0.00000, 0.00000);
    CreateDynamicObject(8656, -2102.04663, 382.47000, 35.22490,   0.00000, -1.00000, -90.00000);
    CreateDynamicObject(8656, -2032.80579, 330.49991, 36.06490,   0.00000, -1.00000, -90.00000);
    CreateDynamicObject(8656, -2042.91479, 395.94809, 35.26490,   0.00000, -1.00000, -90.00000);
    CreateDynamicObject(8496, -2081.91748, 376.68359, 40.87480,   0.00000, 0.00000, 0.00000);
    CreateDynamicObject(1536, -2083.03076, 357.64981, 34.58430,   0.00000, 0.00000, 0.00000);
    CreateDynamicObject(1536, -2080.02222, 357.68979, 34.58430,   0.00000, 0.00000, 180.00000);  
    return true;
}

public OnPlayerConnect(playerid) {
    //Removals
    RemoveBuildingForPlayer(playerid, 10946, -2076.6563, 354.3672, 35.7891, 0.25);
    RemoveBuildingForPlayer(playerid, 11024, -2076.2734, 359.3203, 44.5938, 0.25);
    RemoveBuildingForPlayer(playerid, 11403, -2076.6563, 354.3672, 35.7891, 0.25);
    RemoveBuildingForPlayer(playerid, 3868, -2120.7656, 336.8672, 49.1563, 0.25);
    RemoveBuildingForPlayer(playerid, 3868, -2103.3281, 336.8672, 49.1563, 0.25);
    RemoveBuildingForPlayer(playerid, 3868, -2032.2891, 336.8672, 49.1563, 0.25);
    RemoveBuildingForPlayer(playerid, 3868, -2022.0859, 347.1328, 49.1563, 0.25);
    RemoveBuildingForPlayer(playerid, 3868, -2022.0859, 364.5781, 49.1563, 0.25);
    RemoveBuildingForPlayer(playerid, 3868, -2032.2969, 380.7422, 49.1563, 0.25);
    RemoveBuildingForPlayer(playerid, 3868, -2131.1797, 347.2813, 49.1563, 0.25);
    RemoveBuildingForPlayer(playerid, 3868, -2131.1797, 364.7266, 49.1563, 0.25);
    RemoveBuildingForPlayer(playerid, 3868, -2049.7344, 336.8672, 49.1563, 0.25);
    RemoveBuildingForPlayer(playerid, 3867, -2131.1797, 347.2813, 49.1563, 0.25);
    RemoveBuildingForPlayer(playerid, 3867, -2120.7656, 336.8672, 49.1563, 0.25);
    RemoveBuildingForPlayer(playerid, 3867, -2103.3281, 336.8672, 49.1563, 0.25);
    RemoveBuildingForPlayer(playerid, 3867, -2049.7344, 336.8672, 49.1563, 0.25);
    RemoveBuildingForPlayer(playerid, 3867, -2032.2891, 336.8672, 49.1563, 0.25);
    RemoveBuildingForPlayer(playerid, 3867, -2022.0859, 347.1328, 49.1563, 0.25);
    RemoveBuildingForPlayer(playerid, 3867, -2131.1797, 364.7266, 49.1563, 0.25);
    RemoveBuildingForPlayer(playerid, 10949, -2076.2734, 359.3203, 44.5938, 0.25);
    RemoveBuildingForPlayer(playerid, 3867, -2032.2969, 380.7422, 49.1563, 0.25);
    RemoveBuildingForPlayer(playerid, 3867, -2022.0859, 364.5781, 49.1563, 0.25);
    return true;
}
EDIT: Grr, I forgot to put RemoveBuilding codes in OnPlayerConnect.
Reply
#3

Use RemoveBuildingForPlayer function in OnPlayerConnect.

Never use "#define <symbol>" because you got an undefined symbol - that's not how you fix it.
Reply
#4

Quote:
Originally Posted by iZN
Посмотреть сообщение
You probably have no idea what you're exactly doing. You need Incognito's streamer plugin for using CreateDynamicObject.
I have it.

But i think this has probs couse i havent added OnPlayerSpawn at start and havent closed everything by return 1 ;/

Am i right ?

This is a FS btw
Reply
#5

Quote:
Originally Posted by weedxd
Посмотреть сообщение
I have it.

But i think this has probs couse i havent added OnPlayerSpawn at start and havent closed everything by return 1 ;/

Am i right ?
Sorry I made a mistake which I just realized, I've edited my post above.

OnPlayerSpawn() is called when player spawns, you obviously need to return it true/1 otherwise player can't spawn.
Reply
#6

Quote:
Originally Posted by iZN
Посмотреть сообщение
Sorry I made a mistake which I just realized, I've edited my post above.

OnPlayerSpawn() is called when player spawns, you obviously need to return it true/1 otherwise player can't spawn.
Thanks dude i apriciate ur help rep 4 u
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)