guys whats wrong?
#1

PHP код:
new p1
new p2
new p3
new p4
#endif
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public OnGameModeInit()
p1 CreatePickup(12422,106.9319,2526.3423,16.7592,-1);
p2 CreatePickup(12422,109.4811,2553.3660,304.4030,-1);
p3 CreatePickup(12422,226.6052,2527.8113,16.7939,-1);
p4 CreatePickup(12422,228.6457,2550.3142,304.4030,-1); 
PHP код:
C:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(28) : error 001expected token";"but found "new"
C:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(29) : error 001expected token";"but found "new"
C:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(30) : error 001expected token";"but found "new"
C:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(33) : error 001expected token";"but found "public"
C:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(36) : warning 217loose indentation
C
:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(226) : warning 217loose indentation
C
:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(228) : warning 217loose indentation
C
:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(229) : warning 217loose indentation
C
:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(320) : warning 217loose indentation
C
:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(364) : warning 217loose indentation
C
:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(370) : warning 217loose indentation
C
:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(372) : warning 217loose indentation
C
:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(417) : warning 217loose indentation
C
:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(485) : warning 217loose indentation
C
:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(495) : warning 217loose indentation
C
:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(504) : warning 217loose indentation
C
:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(510) : warning 217loose indentation
C
:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(569) : warning 202number of arguments does not match definition
C
:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(573) : warning 217loose indentation
C
:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(576) : warning 217loose indentation
C
:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(578) : warning 217loose indentation
C
:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(581) : warning 217loose indentation
C
:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(203) : warning 204symbol is assigned a value that is never used"p1"
C:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(204) : warning 204symbol is assigned a value that is never used"p2"
C:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(205) : warning 204symbol is assigned a value that is never used"p3"
C:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(206) : warning 204symbol is assigned a value that is never used"p4"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Reply
#2

This code can be simplified a bunch.
You forgot to add " ; " after your ' new ' statement.
Also, the "Never used" means the script doesn't recall the function be used other as a pickup name.
pawn Код:
new p[4]; // Instead of 4 different global variables, let's wrap it into One(1)

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public OnGameModeInit()
{ // Need a Opening bracket.
   // Now, You always start at [0], so if your total is 4, it's 0-3.
    p[0] = CreatePickup(1242, 2,106.9319,2526.3423,16.7592,-1);
    p[1] = CreatePickup(1242, 2,109.4811,2553.3660,304.4030,-1);
    p[2] = CreatePickup(1242, 2,226.6052,2527.8113,16.7939,-1);
    p[3] = CreatePickup(1242, 2,228.6457,2550.3142,304.4030,-1);
    return 1;
}
pawn Код:
C:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(203) : warning 204: symbol is assigned a value that is never used: "p1"
C:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(204) : warning 204: symbol is assigned a value that is never used: "p2"
C:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(205) : warning 204: symbol is assigned a value that is never used: "p3"
C:\Users\SEETANEEA\Desktop\kailash&div&ritesh songs\MUSIC FROM DESKTOP\!SAMP 3Z!\gamemodes\Untitled.pwn(206) : warning 204: symbol is assigned a value that is never used: "p4"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
/* These are here because " p " isn't being used in the script yet, aside from a Pickup's name, once you do something with it, the warnings will be removed. Ignore for now. */
Reply
#3

Under #include <a_samp>
Insert #pragma tabsize 0
Reply
#4

Quote:
Originally Posted by Rittik
Посмотреть сообщение
Under #include <a_samp>
Insert #pragma tabsize 0
Bad advise.
If you have loose indention warnings, then fix them.
#pragma tabsize 0 is not the right solution.
The warnings are there for a reason, to help you fix your coding.
Reply
#5

Wow
After You Set A Var You Should Use ;
Try This :
PHP код:
new p1;
new 
p2;
new 
p3;
new 
p4;

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public OnGameModeInit()
p1 CreatePickup(12422,106.9319,2526.3423,16.7592,-1);
p2 CreatePickup(12422,109.4811,2553.3660,304.4030,-1);
p3 CreatePickup(12422,226.6052,2527.8113,16.7939,-1);
p4 CreatePickup(12422,228.6457,2550.3142,304.4030,-1); 
Reply
#6

Quote:
Originally Posted by amirab
Посмотреть сообщение
Wow
After You Set A Var You Should Use ;
Try This :
PHP код:
new p1;
new 
p2;
new 
p3;
new 
p4;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public OnGameModeInit()
p1 CreatePickup(12422,106.9319,2526.3423,16.7592,-1);
p2 CreatePickup(12422,109.4811,2553.3660,304.4030,-1);
p3 CreatePickup(12422,226.6052,2527.8113,16.7939,-1);
p4 CreatePickup(12422,228.6457,2550.3142,304.4030,-1); 
why dont try what Lynn said?
it's more efficient. and you forgot to add the brackets
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)