PlayerData // tagmismatch
#1

Error
Код:
J:\Documents and Settings\Boukortt\Bureau\samp\pawno\include\svAddons.inc(376) : warning 213: tag mismatch
J:\Documents and Settings\Boukortt\Bureau\myserver\gamemodes\123123.pwn(357) : error 028: invalid subscript (not an array or too many subscripts): "PlayerData"
J:\Documents and Settings\Boukortt\Bureau\myserver\gamemodes\123123.pwn(357) : warning 215: expression has no effect
J:\Documents and Settings\Boukortt\Bureau\myserver\gamemodes\123123.pwn(357) : error 001: expected token: ";", but found "]"
J:\Documents and Settings\Boukortt\Bureau\myserver\gamemodes\123123.pwn(357) : error 029: invalid expression, assumed zero
J:\Documents and Settings\Boukortt\Bureau\myserver\gamemodes\123123.pwn(357) : 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 357
PHP код:
GetPlayerPos(playeridPlayerData[playerid][pX], PlayerData[playerid][pY], PlayerData[playerid][pZ]); 
Line 376
PHP код:
SendClientMessage(playerid,COLOR_GREY,string); 
Please help me and thanks
Reply
#2

Share with us your PlayerData enumerator and the COLOR_GREY value
Reply
#3

PlayerData

PHP код:
enum PlayerData
{
    
pPass,
    
pCash,
    
pAdmin,
    
pHelper,
    
pDeaths,
    
pPlayerLogged,
    
pMute,
    
pKicks,
    
pKills,
    
pJails,
    
pWarnings,
    
pJailed,
    
pJailTime,
    
pAHide,
    
pAdminDuty,
    
pHelperDuty,
    
pReported,
    
pWeapons[50],
    
pSpectate,
    
pRegistered,
    
pModel,
    
pMember,
    
pRank,
    
pBanned,
    
pAdmName[128],
    
pHelName[128],
    
pSkinUsed,
    
pHelpMe,
    
pDesertEagleKills,
    
pMarkX,
    
pMarkY,
    
pMarkZ,
    
pDonator,
    
pFightStyle
    

COLOR_GREY

PHP код:
#define COL_GREY "{0xAFAFAF}" 
Reply
#4

You need to add the pX, pY and pZ entries to your enumerator in order for you to use them.

As for the SendClientMessage, you're trying to put a string where you should be using an hexadecimal or integer number.

https://sampwiki.blast.hk/wiki/SendClientMessage

This problem is a good example of why you don't just copy-paste things into 'your' gamemode.
Reply
#5

Doesn't help you're using COLOR_GREY in your SendClientMessage but have it defined as COL_GREY.
Reply
#6

Quote:
Originally Posted by oSAINTo
Посмотреть сообщение
Doesn't help you're using COLOR_GREY in your SendClientMessage but have it defined as COL_GREY.
I changed it to

PHP код:
SendClientMessage(playerid,COLOR_GREY,string); 
And i got the same errors/warning

Quote:
Originally Posted by Troydere
Посмотреть сообщение
You need to add the pX, pY and pZ entries to your enumerator in order for you to use them.
Can you please send me the code
Reply
#7

Any help please +rep
Reply
#8

What is so hard? Add these entries to your enumerator like the other ones already in there.

And the color should be defined as an integer, that means without the "" and {}. However if you change this you may broke other code so the easiest way is to put the HEX code in the color parameter inside the SendClientMessage function.

You'll never learn if all what you want is people to fix things for you.
Reply
#9

I did all what you said and i still got the same problems ...
Reply
#10

Show me how you did it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)