[HELP]PublicEnemyNo.1 - CreateObject
#1

Hey there!
I am testing some scripts on my test server and id like you to tell me why ONLY in Public Enemy scripts it gives errors at "CreateObject" like mine. Ive tested on simple gamemodes and it works fine...
Any time i add a code like this at the end of my Penls.pwn script so as to spawn an object, i get the same error:


Line:
Код:
 garage = CreateObject( 971, -1627.539063, 688.219788, 9.757433, 0.000000 , 0.000000 , 0.000000 );
Error:
Код:
D:\Program Files\Rockstar Games\GTA San Andreas\server\gamemodes\penls.pwn(19515) : error 010: invalid function or declaration
I am sure somebody knows the reason, cuz ive seen objected Penls servers before. Thanks a lot!
Reply
#2

put under
pawn Код:
#include <a_samp>
this:
pawn Код:
new garage;
Reply
#3

That what it shows now:

Код:
D:\Program Files\Rockstar Games\GTA San Andreas\server\gamemodes\penls.pwn(19505) : error 010: invalid function or declaration
D:\Program Files\Rockstar Games\GTA San Andreas\server\gamemodes\penls.pwn(19508) : warning 203: symbol is never used: "garage"
Also, would it be fixed using a streamer?

(Note: Dont worry about the line number, i just removed something odd i had installed before)
Reply
#4

pawn Код:
new garage;
garage = CreateObject (971, -1627.539063, 688.219788, 9.757433, 0, 0, 0);
about those errors, first one is incorrect usage of code,
second is because the game only set the variable garage to zero, cuz it doesnt know the use of the invalid code

fix createobject, then warning 203 is fixed aswell,

pawn Код:
new garage;
garage = CreateObject (971, -1627.539063, 688.219788, 9.757433, 0, 0, 0);
it wont make a diffrence if you use a streamer, because a streamer uses createobject, if createobject doesnt work, a streamer surely wont aswell
Reply
#5

pawn Код:
new garage;
garage = CreateObject (971, -1627.539063, 688.219788, 9.757433, 0, 0, 0);
Err, the code you gave me is just the same with mine i had before, no change..nothing. You just moved
pawn Код:
new garage;
at one line before the object. So, i still get the same error.
What do u mean with "fix createobject"
Sorry people if i dont understand you well, and thanks for the additional info u posted!
Reply
#6

i mean, repair createobject

ok, is it possible you have any function called createobject?

cuz i have tested this code, and its just fine, so either your includes are not up to date, or you made an compilation error by defining a function with the same name , then, pro's may ask way you dont see those warnings instead of this ones?
because when too many error or uncompilable code, the compiler just stops and skips the rest
Reply
#7

Quote:
Originally Posted by maij
ok, is it possible you have any function called createobject?
If u mean at "#define" section, no. If i search the script (alt+f) for "CreateObject" or "garage" it gives results only at the lines i posted before. I want to say that nowhere else is a function in the script for objects.

Quote:
Originally Posted by maij
1) so either your includes are not up to date,
2) or you made an compilation error by defining a function with the same name,
1) How could i find updated includes for my script which now uses <a_samp>, <core>, <float>, <time>, <file>
2) I believe, No. Its not definded anywhere else on the script.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)