Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Simple board issue? (https://forums.graalonline.com/forums/showthread.php?t=86307)

The_Kez 06-12-2009 06:17 PM

Simple board issue?
 
Right now I'm working on a script that requires me to be updating a board. So I'm using a series of arrays (6x6) to act as a board.
The problem is that I can't seem to be able to update it at all. I have a script which looks like this:

PHP Code:

//#CLIENTSIDE
function onFunc() {
  
board = {
    { 
00000},
    { 
00000},
    { 
00000},
    { 
00000},
    { 
00000},
    { 
00000}
  };
  
board[0][0] = 1;
  echo( 
board[0][0] ); //returns 0 ??


Is there something I need to keep in mind when editing nested arrays?

DustyPorViva 06-12-2009 06:19 PM

board is already used by Graal, I believe. Try another varname?

The_Kez 06-12-2009 06:35 PM

Ahh :| That is true.
Simply changing it to this.board worked.


All times are GMT +2. The time now is 06:22 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.