SA-MP Forums Archive
Ps Error ? -_- - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Ps Error ? -_- (/showthread.php?tid=431356)



Ps Error ? -_- - RandomDude - 17.04.2013

Quote:

#define pS Player[playerid]

I get these errors
Quote:

C:\Users\Grand\Desktop\SAMP GAMEMODES\Real Stunt world\gamemodes\Clans..pwn(62) : error 017: undefined symbol "pS"
C:\Users\Grand\Desktop\SAMP GAMEMODES\Real Stunt world\gamemodes\Clans..pwn(62) : error 017: undefined symbol "Points"
C:\Users\Grand\Desktop\SAMP GAMEMODES\Real Stunt world\gamemodes\Clans..pwn(62) : error 029: invalid expression, assumed zero
C:\Users\Grand\Desktop\SAMP GAMEMODES\Real Stunt world\gamemodes\Clans..pwn(62) : fatal error 107: too many error messages on one line

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


4 Errors.

This is line 62

Quote:

pS[Points] = 0;

This is were line 62 is

Quote:

public OnPlayerConnect(playerid)
{
pS[Points] = 0;
return 1;
}




Re: Ps Error ? -_- - DaRk_RaiN - 17.04.2013

That not how you define a variable, replace
This
pawn Код:
#define pS Player[playerid]
With this:
pawn Код:
new pS[MAX_PLAYERS];
As for the rest of the code don't change a thing, it should work.


Re: Ps Error ? -_- - RandomDude - 17.04.2013

Nope still the same errors -_- Were do I put it?
After defines right?
If yeah still the same errors.


Re: Ps Error ? -_- - TomatoRage - 17.04.2013

Quote:
Originally Posted by DaRk_RaiN
Посмотреть сообщение
That not how you define a variable, replace
This
pawn Код:
#define pS Player[playerid]
With this:
pawn Код:
new pS[MAX_PLAYERS];
As for the rest of the code don't change a thing, it should work.
With out define try it


Re: Ps Error ? -_- - RandomDude - 18.04.2013

Quote:
Originally Posted by TomatoRage
Посмотреть сообщение
With out define try it
If I do that I get these errors
Quote:

C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(255) : error 017: undefined symbol "pS"
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(255) : warning 215: expression has no effect
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(255) : error 001: expected token: ";", but found "]"
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(255) : error 029: invalid expression, assumed zero
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(255) : fatal error 107: too many error messages on one line

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


4 Errors.




Re: Ps Error ? -_- - RandomDude - 18.04.2013

-_- I'm still stuck?


Re: Ps Error ? -_- - Necip - 18.04.2013

Maybe you didn't add the ";"?Check again.


Re: Ps Error ? -_- - zalix111 - 18.04.2013

Try this:


new pS;
#define pS Player[playerid]

This is FS or GameMode?


Re: Ps Error ? -_- - RandomDude - 18.04.2013

Quote:
Originally Posted by zalix111
Посмотреть сообщение
Try this:


new pS;
#define pS Player[playerid]
Well this worked I think thanks but now I got more errors lol

Quote:

C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(25 : error 017: undefined symbol "Spawned"
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(272) : error 017: undefined symbol "pName"
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(279) : warning 217: loose indentation
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(279) : error 079: inconsistent return types (array & non-array)
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(281) : warning 217: loose indentation
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(281) : error 029: invalid expression, assumed zero
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(281) : error 004: function "OnPlayerDisconnect" is not implemented
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(289) : error 017: undefined symbol "pName"
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(291) : error 079: inconsistent return types (array & non-array)
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(293) : warning 225: unreachable code
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(293) : error 029: invalid expression, assumed zero
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(293) : error 017: undefined symbol "SetPlayerRespawnInfo"
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(300) : error 004: function "GetPlayerClanSkin" is not implemented
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(304) : error 017: undefined symbol "Skin"
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(305) : warning 217: loose indentation
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(30 : error 079: inconsistent return types (array & non-array)
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(311) : warning 217: loose indentation
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(311) : error 029: invalid expression, assumed zero
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(311) : error 004: function "OnPlayerSpawn" is not implemented
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(317) : error 004: function "GivePlayerGun" is not implemented
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(321) : error 004: function "GivePlayerGun" is not implemented
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(327) : error 004: function "SetPlayerToClanColor" is not implemented
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(330) : warning 217: loose indentation
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(330) : error 079: inconsistent return types (array & non-array)
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(332) : warning 225: unreachable code
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(332) : error 029: invalid expression, assumed zero
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(332) : error 004: function "zcmd_OnPlayerCommandText" is not implemented
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(334) : error 017: undefined symbol "Spawned"
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(336) : error 017: undefined symbol "cmdtext"
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(336) : warning 215: expression has no effect
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(336) : error 001: expected token: ";", but found "]"
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(336) : error 029: invalid expression, assumed zero
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\Clan Script.pwn(336) : fatal error 107: too many error messages on one line

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


25 Errors.

I'll try fix some of them or can someone help with them is well are some defines missing?


Re: Ps Error ? -_- - MP2 - 18.04.2013

Quote:
Originally Posted by DaRk_RaiN
Посмотреть сообщение
That not how you define a variable, replace
This
pawn Код:
#define pS Player[playerid]
With this:
pawn Код:
new pS[MAX_PLAYERS];
As for the rest of the code don't change a thing, it should work.
It's not defining a variable; it's defining a macro. It's not an issue.


Make sure the #define is BEFORE when it is used.