AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] Tag Mismatch Error (https://forums.alliedmods.net/showthread.php?t=120534)

Kreation 03-05-2010 19:54

[HELP] Tag Mismatch Error
 
Code:
new tVictim = cs_get_user_team( victim )

Can someone tell me why I get a tag mismatch error from that code?

Exolent[jNr] 03-05-2010 19:58

Re: [HELP] Tag Mismatch Error
 
The team constants for Counter-Strike are tagged with CsTeams.
Code:
new CsTeams:tVictim = cs_get_user_team( victim )

Kreation 03-05-2010 20:42

Re: [HELP] Tag Mismatch Error
 
Ahh, thanks.

EDIT:I have something else I need help with, I'm using
Code:
enum ePlayerData {     bool:bIsRebel,     bool:bLrActive,     bool:bHasFreeday } if ( !ePlayerData[victim][bIsRebel] ) {      //code }

I get "invalid subscript(not an array or to many subscripts: ePlayerData".

How would I fix this? I've tried to make it an array but I can get it to work.

Exolent[jNr] 03-05-2010 21:13

Re: [HELP] Tag Mismatch Error
 
ePlayerData is an enum, not an array.

Code:
enum PlayerData {     bool:bIsRebel,     bool:bLrActive,     bool:bHasFreeday }; new g_ePlayerData[ 33 ][ PlayerData ]; // ... if( g_ePlayerData[ iPlayer ][ bIsRebel ] ) {     client_print( iPlayer, print_chat, "You are a rebel! :P" ); }

Kreation 03-05-2010 21:20

Re: [HELP] Tag Mismatch Error
 
Okay I got it now, thanks again for the help.


All times are GMT -4. The time now is 08:39.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.