•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Pascal and Delphi section within the Software Development category of DaniWeb, a massive community of 361,556 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,007 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Pascal and Delphi advertiser:
Views: 331 | Replies: 2 | Solved
![]() |
•
•
Join Date: May 2008
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
Man, I'm so new. I'm trying to script something for a game. so here's what I got:
This doesn't work apparently. =\
thanks for reading!
program twars;
const
Color = $FFFFFFFF;
FISTS = 0;
DEAGLES = 1;
MP5 = 2;
AK74 = 3;
STEYR = 4;
SPAS = 5;
RUGER = 6;
M79 = 7;
BARRETT = 8;
MINIMI = 9;
MINIGUN = 10;
SOCOM = 11;
KNIFE = 12;
SAW = 13;
LAW = 14;
FLAME = 15;
ARROW = 16;
type
tClasses = record
name,info,tip: string;
weap: array[0..16] of boolean;
end;
var
c: tClasses;
procedure placekeeper;
begin
end;
begin
c[1].name := 'Pyro';
c[1].info := 'Flame';
c[1].tip := 'burn';
c[1].weap := [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false];
end;This doesn't work apparently. =\
thanks for reading!
•
•
Join Date: Jun 2006
Location: Blumenau, Brazil
Posts: 67
Reputation:
Rep Power: 3
Solved Threads: 4
jamesbond110, see this points:
- that "end" in the program main block must be ended with point (.), not a semicolon (;)
- your "c" variable is defined like a tClasses (a record type), so You can't index them like it was a array type.
- if You want store n tClasses records You must declare "c" as array[...] of tClasses, otherwise You must remove the indexer "[1]":
c[1].name => c.name
Bye
- that "end" in the program main block must be ended with point (.), not a semicolon (;)
- your "c" variable is defined like a tClasses (a record type), so You can't index them like it was a array type.
- if You want store n tClasses records You must declare "c" as array[...] of tClasses, otherwise You must remove the indexer "[1]":
c[1].name => c.name
Bye
"It always has, at least, two ways to make one same thing. Exactly that they are certain and wrong"(Micheus)
Brazil - Blumenau
Brazil - Blumenau
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Pascal and Delphi Marketplace
Similar Threads
- Installing Windows 98 On VMware. Floppy problem (Windows 9x / Me)
- Help me with this Simple Problem plss (C)
- BUTTON DOES NOT WORK??? simple problem (C)
- Help with simple problem (C++)
- Simple problem regardingform elements (ASP)
- Mac Mouse Problem! Help me out? (OS X)
Other Threads in the Pascal and Delphi Forum
- Previous Thread: adding video in delphi program
- Next Thread: Pascal Question


Linear Mode