AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Array must be Indexed error! (https://forums.alliedmods.net/showthread.php?t=50400)

OmgHi 01-25-2007 12:42

Array must be Indexed error!
 
Code:

select_string (id,"SAVE","userskillsfireball","authid",authid,buffer)
new userskillsfireball[32]
userskillsfireball = str_to_num(buffer)
if(!is_user_connected(entid) && is_user_alive(id))
{
if((userskillsfireball[entid] >= fireballskill[0] && userskillsfireball[entid] <= fireballskill[1]))


Thats the part of the code where i get the "Userskillsfireball is an array and must be indexed Error 033" Error.

How do i index an array?

Edit: Um for somereason when i paste it its all messed up :s I hope that won't hinder anyone solving my problem

[ --<-@ ] Black Rose 01-25-2007 12:48

Re: Array must be Indexed error!
 
userskillsfireball = str_to_num(buffer)
-->
userskillsfireball[entid] = str_to_num(buffer)

OmgHi 01-25-2007 13:08

Re: Array must be Indexed error!
 
OMG THANKS! SO OBVIOUS!!! HOW COULD I NOT SEE IT!! :D!!

Im going to go try it out right now, thanks man :)


All times are GMT -4. The time now is 22:29.

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