external question
i do this external("stats","load_slayer"); and in stats.c in load_slayer(); i have &strength = 4, &defense = 4, and &magic = 4. they originaly = 3,2,1 (i think) but only the strength gets updated, no matter what order i put the commands in. whats going on?
: i do this external("stats","load_slayer"); and in stats.c in load_slayer(); i have &strength = 4, &defense = 4, and &magic = 4. they originaly = 3,2,1 (i think) but only the strength gets updated, no matter what order i put the commands in. whats going on?
Odd. I can't think why it would do that. Could I see the actual load_slayer() procedure?
Odd. I can't think why it would do that. Could I see the actual load_slayer() procedure?
main.c
------
make_global_int ("&strength",1);
make_global_int ("&defense",1);
make_global_int ("&magic",1);
item slayer
------
void arm()
{
external("stats","load_slayer");
}
stats.c
------
void load_slayer()
{
&strength = 4;
&defense = 4;
&magic = 4;
}
strength goes to 4, nothing else. the only thing i could guess is that start-1 could call the arm after getting the item before some other crucial command, but i can re-equip the item in-game and still no luck. i even tried making another item set &defense and &magic to 3 in arm and the load_slayer still doesnt get it to 4, it stays at 3. try this for yourself.
------
make_global_int ("&strength",1);
make_global_int ("&defense",1);
make_global_int ("&magic",1);
item slayer
------
void arm()
{
external("stats","load_slayer");
}
stats.c
------
void load_slayer()
{
&strength = 4;
&defense = 4;
&magic = 4;
}
strength goes to 4, nothing else. the only thing i could guess is that start-1 could call the arm after getting the item before some other crucial command, but i can re-equip the item in-game and still no luck. i even tried making another item set &defense and &magic to 3 in arm and the load_slayer still doesnt get it to 4, it stays at 3. try this for yourself.
: main.c
: ------
: make_global_int ("&strength",1);
: make_global_int ("&defense",1);
: make_global_int ("&magic",1);
: item slayer
: ------
: void arm()
: {
: external("stats","load_slayer");
: }
: stats.c
: ------
: void load_slayer()
: {
: &strength = 4;
: &defense = 4;
: &magic = 4;
: }
: strength goes to 4, nothing else. the only thing i could guess is that start-1 could call the arm after getting the item before some other crucial command, but i can re-equip the item in-game and still no luck. i even tried making another item set &defense and &magic to 3 in arm and the load_slayer still doesnt get it to 4, it stays at 3. try this for yourself.
add this to the stats.c
draw_status();
: ------
: make_global_int ("&strength",1);
: make_global_int ("&defense",1);
: make_global_int ("&magic",1);
: item slayer
: ------
: void arm()
: {
: external("stats","load_slayer");
: }
: stats.c
: ------
: void load_slayer()
: {
: &strength = 4;
: &defense = 4;
: &magic = 4;
: }
: strength goes to 4, nothing else. the only thing i could guess is that start-1 could call the arm after getting the item before some other crucial command, but i can re-equip the item in-game and still no luck. i even tried making another item set &defense and &magic to 3 in arm and the load_slayer still doesnt get it to 4, it stays at 3. try this for yourself.
add this to the stats.c
draw_status();
: main.c
: ------
: make_global_int ("&strength",1);
: make_global_int ("&defense",1);
: make_global_int ("&magic",1);
: item slayer
: ------
: void arm()
: {
: external("stats","load_slayer");
: }
: stats.c
: ------
: void load_slayer()
: {
: &strength = 4;
: &defense = 4;
: &magic = 4;
: }
: strength goes to 4, nothing else. the only thing i could guess is that start-1 could call the arm after getting the item before some other crucial command, but i can re-equip the item in-game and still no luck. i even tried making another item set &defense and &magic to 3 in arm and the load_slayer still doesnt get it to 4, it stays at 3. try this for yourself.
You're not going to like this...
I tried it and it works perfectly.
But why not just drop the external command and put the stat adjustments right in the item script, it might not be quite as neat, but it should work fine. (And if it doesn't, you'll know something's more basic is wrong.)
: ------
: make_global_int ("&strength",1);
: make_global_int ("&defense",1);
: make_global_int ("&magic",1);
: item slayer
: ------
: void arm()
: {
: external("stats","load_slayer");
: }
: stats.c
: ------
: void load_slayer()
: {
: &strength = 4;
: &defense = 4;
: &magic = 4;
: }
: strength goes to 4, nothing else. the only thing i could guess is that start-1 could call the arm after getting the item before some other crucial command, but i can re-equip the item in-game and still no luck. i even tried making another item set &defense and &magic to 3 in arm and the load_slayer still doesnt get it to 4, it stays at 3. try this for yourself.
You're not going to like this...
I tried it and it works perfectly.
But why not just drop the external command and put the stat adjustments right in the item script, it might not be quite as neat, but it should work fine. (And if it doesn't, you'll know something's more basic is wrong.)
: You're not going to like this...
: I tried it and it works perfectly.
: But why not just drop the external command and put the stat adjustments right in the item script, it might not be quite as neat, but it should work fine. (And if it doesn't, you'll know something's more basic is wrong.)
it works right into the script and spawned, just not with external. and for what im trying to do, having all the stat load and saves modularolarized into one script will be much better.
void load_slayer( void )
{
&defense = 5;
debug("defense should increase now");
&strength = 5;
debug("strength should increase now");
&magic = 5;
debug("magic should increase now");
}
debug:
Dink:Script 1stats is entered at offset 25.
Dink:MERROR: "&defense" unknown in 1stats, offset 72.
Dink:defense should increase now
Dink:strength should increase now
Dink:MERROR: "&magic" unknown in 1stats, offset 191.
Dink:magic should increase now
Dink:Script 1slayer is entered at offset 1869.
: I tried it and it works perfectly.
: But why not just drop the external command and put the stat adjustments right in the item script, it might not be quite as neat, but it should work fine. (And if it doesn't, you'll know something's more basic is wrong.)
it works right into the script and spawned, just not with external. and for what im trying to do, having all the stat load and saves modularolarized into one script will be much better.
void load_slayer( void )
{
&defense = 5;
debug("defense should increase now");
&strength = 5;
debug("strength should increase now");
&magic = 5;
debug("magic should increase now");
}
debug:
Dink:Script 1stats is entered at offset 25.
Dink:MERROR: "&defense" unknown in 1stats, offset 72.
Dink:defense should increase now
Dink:strength should increase now
Dink:MERROR: "&magic" unknown in 1stats, offset 191.
Dink:magic should increase now
Dink:Script 1slayer is entered at offset 1869.
Dink is really funky on spacing. I noticed you have different spacings between &defense/&magic and the = sign... try putting just one space instead.
: Dink is really funky on spacing. I noticed you have different spacings between &defense/&magic and the = sign... try putting just one space instead.
you got it. pretty simple solution actually, it seems i was just expecting it to be something complex from the debug. i will never use debug again.
you got it. pretty simple solution actually, it seems i was just expecting it to be something complex from the debug. i will never use debug again.