Raised This Month: $12 Target: $400
 3% 

[BUG] arrayset


  
 
 
Thread Tools Display Modes
Author Message
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 11-05-2006 , 11:35   [BUG] arrayset
#1

Code:
#include <amxmodx> new faluco[33] = {1, ...}; //arrayset ( array[], value, size ) public plugin_init() {     register_plugin("[]|:o", "1.0", "Hat");     register_srvcmd("run", "cmdRun");     register_srvcmd("set", "cmdSet");     cmdRun()     arrayset(faluco, 1, 33);     cmdRun() } public cmdSet() {     new arg[10];     read_argv(1, arg, 9);     new value = str_to_num(arg);     server_print("New value: %i", value);     arrayset(faluco, value, 33); } public cmdRun() {     for(new i = 0; i < 33; i++)     {         server_print("[TEST] faluco[%i]: %i", i, faluco[i]);     } }

Quote:
The value of faluco is current set to 1 by default.

L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[0]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[1]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[2]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[3]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[4]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[5]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[6]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[7]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[8]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[9]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[10]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[11]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[12]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[13]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[14]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[15]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[16]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[17]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[18]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[19]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[20]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[21]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[22]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[23]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[24]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[25]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[26]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[27]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[28]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[29]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[30]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[31]: 1
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[32]: 1

The array faluco is current getting set to 1 using arrayset. When printing the value of each is 16843009.

L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[0]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[1]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[2]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[3]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[4]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[5]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[6]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[7]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[8]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[9]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[10]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[11]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[12]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[13]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[14]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[15]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[16]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[17]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[18]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[19]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[20]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[21]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[22]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[23]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[24]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[25]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[26]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[27]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[28]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[29]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[30]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[31]: 16843009
L 11/05/2006 - 08:442: [test5.amxx] [TEST] faluco[32]: 16843009
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
VEN
Veteran Member
Join Date: Jan 2005
Old 11-05-2006 , 11:42   Re: [BUG] arrayset
#2

Yes, that's true, i've got this bug too but forgot to do a report. :/
VEN is offline
faluco
Developer
Join Date: Mar 2005
Location: Valencia, Spain
Old 11-05-2006 , 13:42   Re: [BUG] arrayset
#3

:O a faluco array!
^-- without hat
Anyway, fixed in svn in revision 3148.
__________________
:F
faluco is offline
 


Thread Tools
Display Modes

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 18:16.


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