array must be indexed (variable "Subs") - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: array must be indexed (variable "Subs") (
/showthread.php?tid=360036)
array must be indexed (variable "Subs") -
MA_proking - 16.07.2012
I made a code for advert system that if some body place new ads the other ads move down 1 place but its showing a error please help.
pawn Код:
MoveAds(){
new Subs[20], Adve[128], Placer[24],idx;
while (iIndex < 15){
Subs = strval(AdsInfo[idx][Sub]);
Adve = strval(AdsInfo[idx][Advert]);
Placer = strval(AdsInfo[iIndex][Placeby]);
++idx;
AdsInfo[idx][Sub] = strval(Subs);
AdsInfo[idx][Advert] = strval(Adve);
AdsInfo[idx][Placeby] = strval(Placer);
}
return 1;
}
Код:
C:\Documents and Settings\PRABHAT ZONE\Desktop\metrolife\gamemodes\TestADs.pwn(142) : error 033: array must be indexed (variable "Subs")
C:\Documents and Settings\PRABHAT ZONE\Desktop\metrolife\gamemodes\TestADs.pwn(143) : error 033: array must be indexed (variable "Adve")
C:\Documents and Settings\PRABHAT ZONE\Desktop\metrolife\gamemodes\TestADs.pwn(144) : error 033: array must be indexed (variable "Placer")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
Re: array must be indexed (variable "Subs") -
Ballu Miaa - 16.07.2012
WOW My Name is Prabhat too and Im from New Delhi, India also lol. Im not good at strings. I wish i would have learnt that Chapter properly! Sorry bro. Hope i could help!
Re: array must be indexed (variable "Subs") -
MA_proking - 16.07.2012
Thanks for reply I hope you can help.
Re: array must be indexed (variable "Subs") -
ViniBorn - 16.07.2012
Don't use ' = ' for strings, try ' format'