Problem with CreateObject
#1

I'm trying to add these objects into a game mode/filterscript and I get a error message.
Here's my code for my OnGameModeInIt
pawn Код:
public OnGameModeInit()
{
   
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    // objects
    CreateObject(987,1661.80004883,-1885.09997559,12.50000000,0.00000000,0.00000000,0. 00000000); //object(elecfence_bar) (1)
    CreateObject(987,1649.80004883,-1885.09997559,12.60000038,0.00000000,0.00000000,0. 00000000); //object(elecfence_bar) (2)
    CreateObject(987,1637.69995117,-1884.90002441,12.60000038,0.00000000,0.00000000,0. 00000000); //object(elecfence_bar) (3)
    CreateObject(985,1633.40002441,-1884.50000000,12.60000038,0.00000000,0.00000000,0. 00000000); //object(gate_autor) (1)
    CreateObject(987,1617.80004883,-1884.69995117,12.50000000,0.00000000,0.00000000,0. 00000000); //object(elecfence_bar) (4)
    CreateObject(987,1610.50000000,-1884.69995117,12.80000019,0.00000000,0.00000000,0. 00000000); //object(elecfence_bar) (5)
    return 1;
}
And the error message.
Код:
C:\Users\Luke\Desktop\test.pwn(39) : error 001: expected token: ",", but found "."
C:\Users\Luke\Desktop\test.pwn(39) : error 029: invalid expression, assumed zero
C:\Users\Luke\Desktop\test.pwn(39) : warning 215: expression has no effect
C:\Users\Luke\Desktop\test.pwn(39) : error 001: expected token: ";", but found ")"
C:\Users\Luke\Desktop\test.pwn(39) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Line 39 is the "first" CreateObject. What's wrong with it?
Reply
#2

Espace on the last of your create objects 's (0. 00000000) do it (0.00000000) Try
Reply
#3

Quote:
Originally Posted by BigBaws
Посмотреть сообщение
Espace on the last of your create objects 's (0. 00000000) do it (0.00000000) Try
Didn't work.
Reply
#4

Try this
PHP код:
public OnGameModeInit()
{
    
    
SetGameModeText("Blank Script");
    
AddPlayerClass(01958.37831343.157215.3746269.1425000000);
    
// objects
    
CreateObject(987,1661.80004883,-1885.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (1)
    
CreateObject(987,1649.80004883,-1885.09997559,12.60000038,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (2)
    
CreateObject(987,1637.69995117,-1884.90002441,12.60000038,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (3)
    
CreateObject(985,1633.40002441,-1884.50000000,12.60000038,0.00000000,0.00000000,0.00000000); //object(gate_autor) (1)
    
CreateObject(987,1617.80004883,-1884.69995117,12.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (4)
    
CreateObject(987,1610.50000000,-1884.69995117,12.80000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (5)
    
return 1;

Reply
#5

EDIT: Beat me to it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)