View Full Version : Wtf is wrong
Bob The Cat
06-11-2012, 10:08 PM
procedure DeclarePlayerz;
begin
HowManyPlayers := 0;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'My name'; //Your Runescape username
Players[0].Pass := 'password'; //Your Runescape password
Players[0].Active := True; //Set to true if you want to use this player. Set to False to disable this player.
end;
And i get this:
Error: Out Of Range at line 42
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]
wrong forum buddy
http://forums.scar-divi.com/activity.php
might just be an oudated osi?
howmanyplayers := 1;
0 based arrays... starts from 0 which is player[0] meaning the length has to be 1
putonajonny
06-11-2012, 10:16 PM
procedure DeclarePlayerz;
begin
HowManyPlayers := 0;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'My name'; //Your Runescape username
Players[0].Pass := 'password'; //Your Runescape password
Players[0].Active := True; //Set to true if you want to use this player. Set to False to disable this player.
end;
And i get this:
Error: Out Of Range at line 42
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]
Should be:
HowManyPlayers := 1;//Since you are going to have at least 1 player
Bob The Cat
06-11-2012, 10:16 PM
Fixed it myself
HowManyPlayers := 0;
had to be: HowManyPlayers := 1;
E: Thanks Putonajonny, and Pureblood! i figured it out myself but still thank you for posting!
Flight
06-12-2012, 02:21 AM
Fixed it myself
HowManyPlayers := 0;
had to be: HowManyPlayers := 1;
E: Thanks Putonajonny, and Pureblood! i figured it out myself but still thank you for posting!
Very good. :) What matters is if you understand why that fixes it. HowManyPlayers will act as a 'length' of your player array, while Player[] is the actual array, and as everyone knows all arrays begin with [0]. So if your Player[] array is Player[0, 1, 2] then your length (HowManyPlayers) would be 3.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.