Array index out of bounds
#1

I got this error after following the MySQL script sample.

Код:
E:\San Andreas Multiplayer Server Files (Classified)\Castaway Island Roleplay\gamemodes\CI-RP.pwn(4210 -- 4214) : error 032: array index out of bounds (variable "PlayerInfo")
E:\San Andreas Multiplayer Server Files (Classified)\Castaway Island Roleplay\gamemodes\CI-RP.pwn(4219) : error 032: array index out of bounds (variable "PlayerInfo")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
The lines at the "PlayerInfo" part.

pawn Код:
- Code Removed -
Any solution for this ? Also, guide me please ^^
Reply
#2

Is the Pos in the enum with an array of 4?
Reply
#3

What did you exactly "follow"?

Also do you even have your MySQL database set up correctly? Does your script successfully connect to your MySQL server?

A link would be much graceful if provided so that we can help, as it looks like you followed a very undetailed tutorial.
Reply
#4

Quote:
Originally Posted by _Zeus
Посмотреть сообщение
Is the Pos in the enum with an array of 4?
Nope, Dwayne.
Reply
#5

Quote:
Originally Posted by Zex Tan
Посмотреть сообщение
Nope, Dwayne.
Inside the enum, you need to have an array of 4 (0-3) for the X, Y, Z, Angle.

pawn Код:
// ENUM
Pos[4]
Reply
#6

Quote:
Originally Posted by _Zeus
Посмотреть сообщение
Inside the enum, you need to have an array of 4 (0-3) for the X, Y, Z, Angle.

pawn Код:
// ENUM
Pos[4]
It works fine, but I found out that it didn't save into the MySQL database.

Код:
[22:15:49] [ERROR] CMySQLQuery::Execute[OnAccountCheck(d)] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM `users` WHERE `Name` = 'Steven Colt' LIMIT 1' at line 1
The line is around here

pawn Код:
- Code Removed -
Reply
#7

so you're telling me you're creating a RP with that knowledge? good luck.
Reply
#8

pawn Код:
SELECT ID, Password,
You have an extra commas before AFTER.
Reply
#9

Quote:
Originally Posted by _Zeus
Посмотреть сообщение
pawn Код:
SELECT ID, Password,
You have an extra commas before AFTER.
Alright, thank you. FIXED
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)