[BUG] This is freaking me out
#1

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
Reply
#2

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

Reply
#3

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

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.
Reply
#5

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
Reply
#6

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

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...
Reply
#8

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 :/
Reply
#9

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
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)