Raised This Month: $ Target: $400
 0% 

1.8.1 Huge Problems


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Drak
Veteran Member
Join Date: Jul 2005
Old 08-17-2008 , 19:41   1.8.1 Huge Problems
Reply With Quote #1

When compiling over half of my plugins with the new AMXX (1.8.1) they all fail to compile, if they use a variable name of "Array".

Code:
new Array[2] Array[0] = id Array[1] = Target

Will give off "Tag Mismatches" and all kinds of crazy errors.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-17-2008 , 19:42   Re: 1.8.1 Huge Problems
Reply With Quote #2

Show your full code.

EDIT: Don't forget that Array: is a reserved tag for dynamic array, that's why probably you get theses errors.
__________________

Last edited by Arkshine; 08-17-2008 at 19:46.
Arkshine is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 08-17-2008 , 19:51   Re: 1.8.1 Huge Problems
Reply With Quote #3

Oops, I didn't mean to post the thread in "Suggestions/Requests". And I didn't realize "Array" is a reserved tag. That's new in *.1 i'm assuming?
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-17-2008 , 19:53   Re: 1.8.1 Huge Problems
Reply With Quote #4

Since 1.8.0 - Dynamic array. ( see cellarray.inc )
__________________
Arkshine is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 08-17-2008 , 19:56   Re: 1.8.1 Huge Problems
Reply With Quote #5

Huh. I must of been compiling on 1.7X.
EDIT: Alright well, I don't know if it would make a difference, but I want to compile on 1.8.1.
So I commented out cellarray includes. So it doesn't compile with it.
__________________
Oh yeah

Last edited by Drak; 08-17-2008 at 20:00.
Drak is offline
Send a message via MSN to Drak
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 08-17-2008 , 20:15   Re: 1.8.1 Huge Problems
Reply With Quote #6

Just saying but... "Array" is a *terrible* variable name. A variable name should describe what the contents are that it holds.
__________________
Brad is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-17-2008 , 20:18   Re: 1.8.1 Huge Problems
Reply With Quote #7

Moved to Scripting Help.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 08-17-2008 , 21:35   Re: 1.8.1 Huge Problems
Reply With Quote #8

There are a few terms that you can't use for variable names; they'll give you ridiculous errors that are hard to decipher. Just rename the variable.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 08-17-2008 , 21:48   Re: 1.8.1 Huge Problems
Reply With Quote #9

Quote:
Originally Posted by Brad View Post
Just saying but... "Array" is a *terrible* variable name. A variable name should describe what the contents are that it holds.
Well, it is describing the contents, kinda.

Code:
awTest() {     new Array = array_create();     array_set_int(g_MainArray,++g_Items,Array);     array_set_string(Array,1,"Hello World"); } RegisterItems() {     new Array[2]     Array[0] = ItemID     Array[1] = id         _RegisterItem("Test Item","N/A",Array); }
Things liek diiisss
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 08-17-2008 , 22:36   Re: 1.8.1 Huge Problems
Reply With Quote #10

Quote:
Originally Posted by Drak View Post
Well, it is describing the contents, kinda.

Code:
awTest() {     new Array = array_create();     array_set_int(g_MainArray,++g_Items,Array);     array_set_string(Array,1,"Hello World"); } RegisterItems() {     new Array[2]     Array[0] = ItemID     Array[1] = id          _RegisterItem("Test Item","N/A",Array); }

Things liek diiisss
An variable name just describe it's use or purpose,not it's type. A variable named int tells it's a number,but a variable name iPlayerCount tells you what it's used for. Therefore,just avoid the already define names, and use descritive ones.
danielkza is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:17.


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