SA-MP Forums Archive
[BUG] This is freaking me out - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [BUG] This is freaking me out (/showthread.php?tid=135150)



[BUG] This is freaking me out - Rand_Omar - 19.03.2010

Waddap guys, i have something wrong with the gamemode, i am compiling it to finish the last piece and open the server, but it gives me a freak error that i can't figure it out for 3 days, but i failed, i feel it's something pathetic.. i think i need someone's help..


The Error:
Код:
C:\Users\*\Desktop\Server\gamemodes\*.pwn(1407) : error 052: multi-dimensional arrays must be fully initialized
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
The Line with all it's components:
pawn Код:
new GunPrice[30][1] = {
{500}, //parachute
{500}, //sdpistol
{3000}, //deagle
{2500}, //mp5
{3000}, //shotgun
{5000}, //m4
{1000}, //rifle
{25}, //pistolammo
{40}, //shotgunammo
{25}, //smgammo
{40}, //assaultammo
{50} //rifle
}; // Line 1407
Please answer A.S.A.P, players started to get mad.. they're leaving.. thanks!

Topic Definitions:

* Hidden Info


Re: [BUG] This is freaking me out - WackoX - 19.03.2010

Quote:

new GunPrice[12][1] = {
{500}, //parachute
{500}, //sdpistol
{3000}, //deagle
{2500}, //mp5
{3000}, //shotgun
{5000}, //m4
{1000}, //rifle
{25}, //pistolammo
{40}, //shotgunammo
{25}, //smgammo
{40}, //assaultammo
{50} //rifle
}; // Line 1407




Re: [BUG] This is freaking me out - [cA]Unforseen - 19.03.2010

weird
it works fine when i've tryed it
make sure you are using it right or in the right place


Re: [BUG] This is freaking me out - Rand_Omar - 19.03.2010

Quote:
Originally Posted by WackoX
Quote:

new GunPrice[12][1] = {
{500}, //parachute
{500}, //sdpistol
{3000}, //deagle
{2500}, //mp5
{3000}, //shotgun
{5000}, //m4
{1000}, //rifle
{25}, //pistolammo
{40}, //shotgunammo
{25}, //smgammo
{40}, //assaultammo
{50} //rifle
}; // Line 1407

This gave me multiple errors..

Код:
C:\Users\*\Desktop\Server\gamemodes\*.pwn(18893 -- 18894) : error 032: array index out of bounds (variable "GunPrice")
C:\Users\*\Desktop\Server\gamemodes\*.pwn(18896 -- 18897) : error 032: array index out of bounds (variable "GunPrice")
C:\Users\*\Desktop\Server\gamemodes\*.pwn(18899 -- 18900) : error 032: array index out of bounds (variable "GunPrice")
C:\Users\*\Desktop\Server\gamemodes\*.pwn(18902 -- 18903) : error 032: array index out of bounds (variable "GunPrice")
C:\Users\*\Desktop\Server\gamemodes\*.pwn(18975) : error 032: array index out of bounds (variable "GunPrice")
C:\Users\*\Desktop\Server\gamemodes\*.pwn(18980) : error 032: array index out of bounds (variable "GunPrice")
C:\Users\*\Desktop\Server\gamemodes\*.pwn(18980) : error 032: array index out of bounds (variable "GunPrice")
C:\Users\*\Desktop\Server\gamemodes\*.pwn(18985) : error 032: array index out of bounds (variable "GunPrice")
C:\Users\*\Desktop\Server\gamemodes\*.pwn(18985) : error 032: array index out of bounds (variable "GunPrice")
C:\Users\*\Desktop\Server\gamemodes\*.pwn(18990) : error 032: array index out of bounds (variable "GunPrice")
C:\Users\*\Desktop\Server\gamemodes\*.pwn(18990) : error 032: array index out of bounds (variable "GunPrice")
C:\Users\*\Desktop\Server\gamemodes\*.pwn(18995) : error 032: array index out of bounds (variable "GunPrice")
C:\Users\*\Desktop\Server\gamemodes\*.pwn(18995) : error 032: array index out of bounds (variable "GunPrice")
C:\Users\*\Desktop\Server\gamemodes\*.pwn(19000) : error 032: array index out of bounds (variable "GunPrice")
C:\Users\*\Desktop\Server\gamemodes\*.pwn(19000) : error 032: array index out of bounds (variable "GunPrice")
C:\Users\*\Desktop\Server\gamemodes\*.pwn(19005) : error 032: array index out of bounds (variable "GunPrice")
C:\Users\*\Desktop\Server\gamemodes\*.pwn(19005) : error 032: array index out of bounds (variable "GunPrice")
C:\Users\*\Desktop\Server\gamemodes\*.pwn(19010) : error 032: array index out of bounds (variable "GunPrice")
C:\Users\*\Desktop\Server\gamemodes\*.pwn(19010) : error 032: array index out of bounds (variable "GunPrice")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


19 Errors.



Re: [BUG] This is freaking me out - [LSR]State_Trooper - 19.03.2010

Try this

new GunPrice[12][1] = {
{500}, //parachute
{500}, //sdpistol
{3000}, //deagle
{2500}, //mp5
{3000}, //shotgun
{5000}, //m4
{1000}, //rifle
{25}, //pistolammo
{40}, //shotgunammo
{25}, //smgammo
{40}, //assaultammo
{50}, //rifle
}; // Line 1407


Re: [BUG] This is freaking me out - smeti - 19.03.2010

http://forum.sa-mp.com/index.php?top....0#post_excess


Re: [BUG] This is freaking me out - [cA]Unforseen - 19.03.2010

try this

new GunPrice[12][1] = {
(500), //parachute
(500), //sdpistol
(3000), //deagle
(2500), //mp5
(3000), //shotgun
(5000), //m4
(1000), //rifle
(25), //pistolammo
(40), //shotgunammo
(25), //smgammo
(40), //assaultammo
(50), //rifle
}; // Line 1407


or without () ex. 500 //parachute...


Re: [BUG] This is freaking me out - [LSR]State_Trooper - 19.03.2010

Quote:
Originally Posted by [cA
Unforseen ]
try this

new GunPrice[12][1] = {
(500), //parachute
(500), //sdpistol
(3000), //deagle
(2500), //mp5
(3000), //shotgun
(5000), //m4
(1000), //rifle
(25), //pistolammo
(40), //shotgunammo
(25), //smgammo
(40), //assaultammo
(50), //rifle
}; // Line 1407


or without () ex. 500 //parachute...
Exactly what I said, Like you copied and Pasted :/


Re: [BUG] This is freaking me out - [cA]Unforseen - 19.03.2010

Quote:
Originally Posted by [LSR
State_Trooper ]
Quote:
Originally Posted by [cA
Unforseen ]
try this

new GunPrice[12][1] = {
(500), //parachute
(500), //sdpistol
(3000), //deagle
(2500), //mp5
(3000), //shotgun
(5000), //m4
(1000), //rifle
(25), //pistolammo
(40), //shotgunammo
(25), //smgammo
(40), //assaultammo
(50), //rifle
}; // Line 1407


or without () ex. 500 //parachute...
Exactly what I said, Like you copied and Pasted :/
nononono chill
not the same!
u have used {} and i've used ()
the , is not the problem :S


Re: [BUG] This is freaking me out - Nero_3D - 19.03.2010

That one was correct but bad written

Quote:
Originally Posted by WackoX
Quote:

new GunPrice[12][1] = {
{500}, //parachute
{500}, //sdpistol
{3000}, //deagle
{2500}, //mp5
{3000}, //shotgun
{5000}, //m4
{1000}, //rifle
{25}, //pistolammo
{40}, //shotgunammo
{25}, //smgammo
{40}, //assaultammo
{50} //rifle
}; // Line 1407

Here would be a better version

pawn Код:
new GunPrice[] = {
500, //parachute
500, //sdpistol
3000, //deagle
2500, //mp5
3000, //shotgun
5000, //m4
1000, //rifle
25, //pistolammo
40, //shotgunammo
25, //smgammo
40, //assaultammo
50 //rifle
};
And if you get errors, its not this code