Author Topic: Having issues with RageQuit code.  (Read 2045 times)

I am recoding my old RageQuit script since it's lost and I loved it since it was my first one, I have most of the stuff coded, but I get this error:



Code: [Select]
removed
Fixed.
« Last Edit: February 14, 2014, 02:35:06 PM by IdeTheBird »

I've looked over it a couple times and I can't find anything wrong.

Unless I'm just an idiot, maybe restart Blockland?

I've looked over it a couple times and I can't find anything wrong.

Unless I'm just an idiot, maybe restart Blockland?
It's near the end, if I remove

messageclient(%target,'MsgError', "\c3" @ %client.name @ "\c6 has removed your rage.");
messageClient(%client,'MsgError', "\c6You have removed the rage from /c3" @ %target.name);


It will work, however I would like to keep these lines.  Not sure what's wrong.

Maybe it's the /c3 you typed? Don't you mean \c3?

Maybe it's the /c3 you typed? Don't you mean \c3?
That wouldn't do anything, just make it say

Quote
You have removed the rage from /c3 Name

I think, I'll try it and restarting.

The problem is that you have activatePackage("Ragequit"); instead of activatePackage(Ragequit);
« Last Edit: February 13, 2014, 10:40:16 PM by Scriode »

The problem is that you have activatePackage("Ragequit"); instead of activatePackage(Ragequit);
This isn't a problem unless he has a object named Ragequit. This just flat out isn't a problem. Torquescript's bastardization of string type data handles that problem.
Go ahead: try running activatePackage("packageName");
Additionally, riddle me this: why isn't the syntax error centered on that if that is the problem?


Are you loading the mod from inside a zip file? It's necessary to setModPaths(getModPaths()); prior to executing the script file. It might be necessary to reload the server as well - the game only reads a certain amount of the script from the zip file. It stores the length of the .cs file or something, and if you modify the code it'll be longer than expected.
« Last Edit: February 13, 2014, 10:47:37 PM by Lugnut »

This isn't a problem unless he has a object named Ragequit. This just flat out isn't a problem. Torquescript's bastardization of string type data handles that problem.
Go ahead: try running activatePackage("packageName");
Alright

Additionally, riddle me this: why isn't the syntax error centered on that if that is the problem?
You say that like the the syntax error finder has always been correct.

Also. I just ran OP's original script and it worked fine. I don't know where he got that error from.

He failed to reboot his server then. That's the problem here, we're done folks.

call setModpaths(getModpaths()); or discoverFile("add-ons/script_ragequit.zip"); before executing it if you modify files in a zip. Otherwise it will only read the file to the old length and cut off the rest.

Don't put wip mods in zip files, those are really just intended for distribution.  Simply putting your files in a regular folder in the add-ons folder will work fine.
Also you are going to run into problems when you try to access %client.bl_id and %client.name after you have already deleted the client.  I suggest storing those values in temporary variables so you can reference them after the delete.

It's near the end, if I remove

messageclient(%target,'MsgError', "\c3" @ %client.name @ "\c6 has removed your rage.");
messageClient(%client,'MsgError', "\c6You have removed the rage from /c3" @ %target.name);


It will work, however I would like to keep these lines.  Not sure what's wrong.

Is 'MsgError' actually a function?

also what are you returning when you do?:
Code: [Select]
return;
Maybe that's confusing it?

Is 'MsgError' actually a function?

also what are you returning when you do?:
Code: [Select]
return;
Maybe that's confusing it?
wat

wat

He is returning NULL on the %client, and it's before the MsgError, might not be the case but just a suggestion.

Is 'MsgError' actually a function?
It's a string. Stop trying to help.