Author Topic: Script crashes game - produces no errors - RESOLVED on Pg. 2  (Read 1869 times)

Does file size have anything to do with it?

I was planning on having the section where you view the mods index bring up a ton of links to direct downloads, y'know the <a:link>text</a> stuff.

Probably going to just make a quick little website or a mediafire folder for it to reduce weight on the script.

Anywho, I'm testing that version now.

No, it's just bad practice to have 3 kilobyte banners for delimiting sections. At most have a 120-character horizontal line, like this:

// ========================================= Section Name ==========================================

Code: [Select]
%client.play2d(Beep_Checkout_Sound);;
Syntax error came up on line 20.  Double semicolon.  Removing it and restarting.

No, it's just bad practice to have 3 kilobyte banners for delimiting sections. At most have a 120-character horizontal line, like this:

// ========================================= Section Name ==========================================
Gotcha.  Will use that next time.



Okay, so I did the same thing, and got to "Loading Datablocks", where it got about 1.3 seconds in before crashing.  The text for when the client joins did not show.

Another strange thing is that I made a guide like this before, and this problem never happened.
« Last Edit: April 05, 2014, 04:11:23 AM by SWAT One »

Double semicolon.  Removing it and restarting.

Oh yeah. Whoops. Do Ctrl + H => ;; => ; in Notepad instead.

Oh yeah. Whoops. Do Ctrl + H => ;; => ; in Notepad instead.
Yeah, that's technically a better method, but I came up with no syntax errors this time.  Look in my above post - edited.

Also, another theory, could the problem have to do with the file name or a missing namecheck.txt?  Nothing clued me in on that, but just curious.

Nah, Namecheck.txt files are only used to make sure the add-on name hasn't been changed. It's good practice to have one, but not strictly speaking necessary for private or public add-ons in any way. You do need a description.txt, but judging by the fact that the add-on is starting at all, you already have one.

Incidentally, does Blockland still crash when the add-on is disabled?

I don't have a namecheck.txt, but will add one for safety.

No, with all the other mods I have enabled this is the ONLY one that makes a difference, and it's pitiful because it's the user guide on how to play.  Would you like me to upload the most recent copy for you to try out yourself?

Code: [Select]
package fimodguide
{
function GameConnection::onClientEnterGame(%cl)
{
messageClient(%cl, '', "\c6For the \c4Floating Islands Guide\c6, say \c3/fi help\c6.");
return Parent::onClientEnterGame(%cl);
}
};
activatepackage("fimodguide");

Try that instead. If that still crashes, try removing the package.

Crashed in both cases of having and not having the package.

Try this:

Code: [Select]
package fimodguide
{
function GameConnection::onClientEnterGame(%cl)
{
messageClient(%cl, '', "\c6For the \c4Floating Islands Guide\c6, say \c3/fi help\c6.");
return Parent::onClientEnterGame(%cl);
}
};
activatepackage("fimodguide");

function servercmdfi(%client, %category, %sub0, %sub1)
{
if(%category $= "define")
{
//Define category
if(%sub0 $= "Travelers")
{
messageClient(%client,'',"\c6 ===== \c4Floating Islands Guide\c6 =====");
messageClient(%client,'',"\c3Travelers\c6 are those who are undeclared in intention.  They can be harmful or docile.  You can become a \c3Traveler\c6 by saying \c3/do join Travelers\c6.");
%client.play2d(Beep_Checkout_Sound);
}
else if(%sub0 $= "Pirates")
{
messageClient(%client,'',"\c6 ===== \c4Floating Islands Guide\c6 =====");
messageClient(%client,'',"\c3Pirates\c6 are those who have declared hostile intentions against players.  You can become a \c3Pirate\c6 by saying \c3/do join Pirates\c6.");
%client.play2d(Beep_Checkout_Sound);
}
else if(%sub0 $= "SM")
{
messageClient(%client,'',"\c6 ===== \c4Floating Islands Guide\c6 =====");
messageClient(%client,'',"\c3SM\c6 stands for Server Maintenance.  This is a position reserved for Admins, usually Super Admins.  Non-competitive.");
%client.play2d(Beep_Checkout_Sound);
}
else if(%sub0 $= "Teams")
{
messageClient(%client,'',"\c6 ===== \c4Floating Islands Guide\c6 =====");
messageClient(%client,'',"\c3Teams\c6 are special groups within your \c3Category\c6.  You can damage people in your \c3Category\c6, but not people in your \c3Team\c6.  For more information on \c3Teams\c6, say \c3/team help\c6.");
%client.play2d(Beep_Checkout_Sound);
}
else if(%sub0 $= "Categories")
{
messageClient(%client,'',"\c6 ===== \c4Floating Islands Guide\c6 =====");
messageClient(%client,'',"\c3Categories\c6 are types of people based on alignment.  This includes \c3Travelers\c6 and \c3Pirates\c6.");
%client.play2d(Beep_Checkout_Sound);
}
else if(%sub0 $= "Blocs")
{
messageClient(%client,'',"\c6 ===== \c4Floating Islands Guide\c6 =====");
messageClient(%client,'',"\c3Blocs\c6 are the floating islands that you see around you.  For more information on the \c3Blocs\c6, say \c3/fi backstory\c6.");
%client.play2d(Beep_Checkout_Sound);
}
else if(%sub0 $= "Radio")
{
messageClient(%client,'',"\c6 ===== \c4Floating Islands Guide\c6 =====");
messageClient(%client,'',"\c3Radio\c6 is a way of communicating with your comerades from all across the archipelago.  For more information, say \c3/radio help\c6.");
%client.play2d(Beep_Checkout_Sound);
}
else
{
messageclient(%client,'',"\c0ERROR: \c6It appears you typed something wrong.  Make sure the format follows \c3/fi define [name]\c6.  For more info, say \c3/fi index\c6 for a list of official names.");
%client.play2d(Beep_TryAgain_Sound);
}
}
else if(%category $= "story")
{
//Story category
messageClient(%client,'',"\c6 ===== \c4Floating Islands Guide\c6 =====");
messageClient(%client,'',"\c6Type \c3/fi define blocs\c6 for information on the blocs.");
messageClient(%client,'',"\c6Type \c3/fi define categories\c6 for information on the categories of alignment.");
messageClient(%client,'',"\c6Type \c3/fi define teams\c6 for information on teams.");
messageClient(%client,'',"\c6Type \c3/fi define radio\c6 for information on the radio communications system.");
messageClient(%client,'',"\c6Type \c3/fi define travelers\c6 for information on the traveler category.");
messageClient(%client,'',"\c6Type \c3/fi define pirates\c6 for information on the pirate category.");
messageClient(%client,'',"\c4Scroll up if you can't see all of this text.");
%client.play2d(Beep_Checkout_Sound);
}
else if(%category $= "index")
{
//Index category
if(%sub0 $= "families")
{
messageClient(%client,'',"\c6 ===== \c4Floating Islands Guide\c6 =====");
messageClient(%client,'',"\c6Type \c3/fi index definitions\c6 for a list of definable terms.");
messageClient(%client,'',"\c6Type \c3/fi index commands\c6 for a list of commands at use in this mod.");
messageClient(%client,'',"\c6Type \c3/fi index server\c6 for a list mods used and required including download links, recommended settings, and credits.");
messageClient(%client,'',"\c6Type \c3/fi index families\c6 to display this list.");
messageClient(%client,'',"\c4Scroll up if you can't see all of this text.");
%client.play2d(Beep_Checkout_Sound);
}
else if(%sub0 $= "definitions")
{
messageClient(%client,'',"\c6 ===== \c4Floating Islands Guide\c6 =====");
messageClient(%client,'',"\c6Type \c3/fi define blocs\c6 for information on the blocs.");
messageClient(%client,'',"\c6Type \c3/fi define categories\c6 for information on the categories of alignment.");
messageClient(%client,'',"\c6Type \c3/fi define teams\c6 for information on teams.");
messageClient(%client,'',"\c6Type \c3/fi define radio\c6 for information on the radio communications system.");
messageClient(%client,'',"\c6Type \c3/fi define travelers\c6 for information on the traveler category.");
messageClient(%client,'',"\c6Type \c3/fi define pirates\c6 for information on the pirate category.");
messageClient(%client,'',"\c4Scroll up if you can't see all of this text.");
%client.play2d(Beep_Checkout_Sound);
}
else if(%sub0 $= "commands")
{
messageClient(%client,'',"\c6 ===== \c4Floating Islands Guide\c6 =====");
messageClient(%client,'',"\c6Type \c3/do travelers join\c6 to join the travelers.");
messageClient(%client,'',"\c6Type \c3/do pirates join\c6 to join the pirates.");
messageClient(%client,'',"\c6Type \c3/do rlink enable\c6 when near a remote synch panel to synch with it.");
messageClient(%client,'',"\c6Type \c3/do rlink disable\c6 when near a remote synch panel to de-synch with it.");
messageClient(%client,'',"\c6Type \c3/radio help\c6 for instructions on how to use the radio mod.");
messageClient(%client,'',"\c6Type \c3/team help\c6 for instructions on how to manage teams.");
messageClient(%client,'',"\c4Scroll up if you can't see all of this text.");
%client.play2d(Beep_Checkout_Sound);
}
else if(%sub0 $= "server")
{
if(%sub1 $= "mods")
{
messageClient(%client,'',"\c6 ===== \c4Floating Islands Guide\c6 =====");
messageClient(%client,'',"\c5You do not have to download these Add-Ons, but if you download these and place them in your Add-Ons folder, your load will be much faster.");
messageClient(%client,'',"\c7This list is still under construction.");
messageClient(%client,'',"\c4Scroll up if you can't see all of this text.");
%client.play2d(Beep_Checkout_Sound);
}
else if(%sub1 $= "settings")
{
messageClient(%client,'',"\c6 ===== \c4Floating Islands Guide\c6 =====");
messageClient(%client,'',"\c6If you wish to load quicker and play with lower quality, it is recommended that you disable downloading \c4textures\c6, \c4sounds\c6, and \c4music\c6.");
messageClient(%client,'',"\c6If you wish to play with higher quality, but possibly load slower, it is recommended that you enable downloading \c4textures\c6, \c4sounds\c6, and \c4music\c6.");
messageClient(%client,'',"\c4Scroll up if you can't see all of this text.");
%client.play2d(Beep_Checkout_Sound);
}
else if(%sub1 $= "credits")
{
for(%i=0;%i<20;%i++)
{
%dLine = %dLine @ "= ";
%sLine = %sLine @ "- ";
}
messageClient(%client,'',"\c6 ===== \c4Floating Islands Guide\c6 =====");
messageClient(%client, '', %dLine);
messageClient(%client,'',"\c3Project Leader");
messageClient(%client,'',"\c1[\c2BL_ID 14257\c1]  \c6Tuevon");
messageClient(%client, '', %sLine);
messageClient(%client,'',"\c3Builders");
messageClient(%client,'',"\c1[\c2BL_ID 14257\c1]  \c6Tuevon");
messageClient(%client,'',"\c1[\c2BL_ID 5200\c1]  \c6sos339");
messageClient(%client, '', %sLine);
messageClient(%client,'',"\c3Eventers");
messageClient(%client,'',"\c1[\c2BL_ID 14257\c1]  \c6Tuevon");
messageClient(%client, '', %sLine);
messageClient(%client,'',"\c3Scripters");
messageClient(%client,'',"\c1[\c2BL_ID 14257\c1]  \c6Tuevon");
messageClient(%client, '', %dLine);
messageClient(%client,'',"\c6If you would like to contribute, ask Tuevon for assistance.");
%client.play2d(Beep_Checkout_Sound);
}
else if(%sub1 $= "list")
{
messageClient(%client,'',"\c6Type \c3/fi index server mods\c6 for information on mods used, required and recommended for better gameplay.");
messageClient(%client,'',"\c6Type \c3/fi index server settings\c6 for aid on recommended settings for quick play, detail play, or anything imbetween.");
messageClient(%client,'',"\c6Type \c3/fi index server credits\c6 for credits on those who made this server possible.");
messageClient(%client,'',"\c6Type \c3/fi index server list\c6 to display this list.");
}
else
{
messageclient(%client,'',"\c0ERROR: \c6Say \c3/fi index server list\c6 for a list of catagories.");
%client.play2d(Beep_TryAgain_Sound);
}
}
else
{
messageclient(%client,'',"\c0ERROR: \c6Say \c3/resource index families\c6 for a list of catagories.");
%client.play2d(Beep_TryAgain_Sound);
}
}
else if(%category $= "help")
{
//Help category
messageClient(%client,'',"\c6 ===== \c4Floating Islands Guide\c6 =====");
messageClient(%client,'',"\c6Type \c3/fi define [name]\c6 for a description on any bit of content.");
messageClient(%client,'',"\c6Type \c3/fi story\c6 for a backstory.");
messageClient(%client,'',"\c6Type \c3/fi index\c6 for a list of all sorts of goodies.");
messageClient(%client,'',"\c6Type \c3/fi help\c6 to display this list.");
messageClient(%client,'',"\c4Scroll up if you can't see all of this text.");
%client.play2d(Beep_Checkout_Sound);
}
else
{
messageclient(%client,'',"\c0ERROR: \c6Say \c3/fi help\c6 for assistance.");
%client.play2d(Beep_TryAgain_Sound);
}
}

On it.

Also check your model request thread.



Okay, it works, but it looks like the story part was removed entirely.  Did you remove the backstory section?

Nope.  That was me being a dingus and having to write a new backstory.  forget.
« Last Edit: April 05, 2014, 05:20:43 AM by SWAT One »

Welp

The lesson learned: String comparisons on single-word strings SHOULD be in quotes.


TorqueScript for the win. :/

Thanks so much.  You will be put in the credits section for sure.

Welp

The lesson learned: String comparisons on single-word strings SHOULD be in quotes.


TorqueScript for the win. :/
Well... Guess he should have followed my advice on the second post in the topic...